From 37a6972f5e02928cb522a44996d78c55fbad3862 Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Thu, 28 Dec 2023 02:23:25 +0300 Subject: Рефакторинг MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 6 ------ .gitignore | 1 + docker-compose.yml | 13 +++++++++++++ etc/Caddyfile | 31 ++++++++----------------------- 4 files changed, 22 insertions(+), 29 deletions(-) delete mode 100644 .env create mode 100644 .gitignore diff --git a/.env b/.env deleted file mode 100644 index 0780579..0000000 --- a/.env +++ /dev/null @@ -1,6 +0,0 @@ -PG_NAME=gitea -PG_USER=gitea -PG_PASS=gitea -GITEA_CLIENT=c9250f03-617e-4412-8e66-1e8aa627b5fb -GITEA_SECRET=gto_2vircz7yf4kt24d5wkpcyo2nzfeztlp56qsggvmxue6a2smdkjnq -WOODPECKER_AGENT_SECRET=Eeshi9aechooh4Ae \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 62c9859..701b5b3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,7 @@ services: volumes: - ./etc/Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data + - blog_data:/var/www/neonxp.dev/public networks: - gateway @@ -49,6 +50,7 @@ services: forgejo_db: image: postgres:13-alpine + container_name: forgejo_db restart: always env_file: - .env @@ -71,6 +73,7 @@ services: woodpecker_server: image: woodpeckerci/woodpecker-server:latest + container_name: woodpecker_server volumes: - woodpecker_data:/var/lib/woodpecker/ environment: @@ -90,6 +93,7 @@ services: woodpecker_agent: image: woodpeckerci/woodpecker-agent:latest + container_name: woodpecker_agent command: agent restart: always depends_on: @@ -104,6 +108,7 @@ services: goproxy_server: image: gitrepo.ru/neonxp/pkg:latest + container_name: goproxy_server restart: unless-stopped volumes: - ./etc/pkg.json:/usr/app/config.json @@ -112,6 +117,7 @@ services: opengist_server: image: ghcr.io/thomiceli/opengist:1 + container_name: opengist_server restart: unless-stopped volumes: - opengist_data:/root/.opengist @@ -124,6 +130,7 @@ services: remark_server: image: umputun/remark42:latest + container_name: remark_server hostname: "remark42" restart: always @@ -166,6 +173,11 @@ services: networks: - gateway + blog: + image: gitrepo.ru/neonxp/blog:latest + command: ["hugo", "-v"] + volumes: + - blog_data:/app/public volumes: caddy_data: @@ -174,6 +186,7 @@ volumes: forgejo_data: forgejo_db_data: woodpecker_data: + blog_data: networks: gateway: diff --git a/etc/Caddyfile b/etc/Caddyfile index ab84b55..652cb4b 100644 --- a/etc/Caddyfile +++ b/etc/Caddyfile @@ -25,11 +25,19 @@ go.neonxp.dev { reverse_proxy goproxy_server:8080 } +go.neonxp.ru { + reverse_proxy goproxy_server:8080 +} + # idec.neonxp.dev { # reverse_proxy iigo:8080 # } neonxp.dev { + redir https://neonxp.ru +} + +neonxp.ru { tls i@neonxp.dev encode gzip root * /var/www/neonxp.dev/public @@ -69,27 +77,4 @@ timer.neonxp.dev { } } -files.neonxp.dev { - tls i@neonxp.dev - encode gzip - root * /files - file_server { - browse - } - header / { - Content-Security-Policy = "upgrade-insecure-requests; default-src 'self'; style-src 'self'; script-src 'self'; img-src 'self'; object-src 'self'; worker-src 'self'; manifest-src 'self';" - Strict-Transport-Security = "max-age=63072000; includeSubDomains; preload" - X-Xss-Protection = "1; mode=block" - X-Frame-Options = "DENY" - X-Content-Type-Options = "nosniff" - Referrer-Policy = "strict-origin-when-cross-origin" - Permissions-Policy = "fullscreen=(self)" - cache-control = "max-age=0,no-cache,no-store,must-revalidate" - } - log { - output file /var/log/caddy/neonxp.dev/files.neonxp.dev.log - } -} - - # https://caddyserver.com/docs/caddyfile -- cgit v1.2.3