From 348d17aa0b05cc8ece87cf92571faeddf48da5ee Mon Sep 17 00:00:00 2001 From: pluja Date: Mon, 22 Apr 2024 11:59:33 +0200 Subject: [PATCH] update compose files, use external tor, remove unused containers --- docker-compose.dev.yml | 1 - docker-compose.yml | 40 ++++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 44450cd..df45f4e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,4 +1,3 @@ -version: "3.9" name: "kycnotme_v2024" services: diff --git a/docker-compose.yml b/docker-compose.yml index 7608d11..2ac0303 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3.9" name: "kycnotme_v2024" networks: @@ -11,24 +10,19 @@ volumes: pb_migrations: {} services: - crawler: - container_name: kycnotme-crawler - build: ./crawler - website: container_name: kycnotme-website build: ./src networks: caddy: - aliases: - - "website" default: - aliases: - - "website" volumes: - ./src/frontend/templates:/app/frontend/templates env_file: - .env + depends_on: + pocketbase: + condition: service_healthy labels: caddy: "${WEB_DOMAIN}" caddy.reverse_proxy: "{{upstreams 4488}}" @@ -40,7 +34,7 @@ services: pocketbase: image: spectado/pocketbase:latest container_name: kycnotme-pocketbase - restart: unless-stopped + restart: always volumes: - pb_data:/pb_data - pb_public:/pb_public @@ -48,39 +42,45 @@ services: caddy: {} default: aliases: - - "pocketbase" - "database" labels: caddy: "${PB_DOMAIN}" caddy.reverse_proxy: "{{upstreams 80}}" - caddy.request_body.max_size: 10MB + caddy.request_body.max_size: 20MB + caddy.header.X-Robots-Tag: "noindex" + caddy.header.Strict-Transport-Security: "max-age=31536000; includeSubdomains; preload;" healthcheck: #optional (recommended) since v0.10.0 test: wget --no-verbose --tries=1 --spider http://localhost:80/api/health || exit 1 interval: 5s timeout: 5s retries: 5 + tor: - build: - context: ./docker/tor/ + image: goldy/tor-hidden-service:latest profiles: ["tor"] container_name: kycnotme-tor - restart: unless-stopped + restart: always networks: caddy: {} default: {} + links: + - website volumes: - - ./docker/tor/data:/var/lib/tor - labels: - caddy: ${ONION_ADDRESS} - caddy.reverse_proxy: "website:4488" + - ./docker/tor/hidden_service:/var/lib/tor/hidden_service + environment: + SERVICE1_TOR_SERVICE_HOSTS: 80:website:4488 + SERVICE1_TOR_SERVICE_VERSION: '3' + #labels: + # caddy: ${ONION_ADDRESS} + # caddy.reverse_proxy: "website:4488" i2pd: build: context: ./docker/i2p/ profiles: ["i2p"] container_name: kycnotme-i2p - restart: unless-stopped + restart: always networks: caddy: {} default: {}