From a904a2aa971aa71b736a8ae95f15751fedbb9b5c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 5 Apr 2026 13:46:39 +0000 Subject: [PATCH] pushing hosting solution --- Caddyfile | 9 +++++++-- docker-compose.yml | 33 ++++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Caddyfile b/Caddyfile index 8e41b89..481530a 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,3 +1,8 @@ -:80 { +devops.softsand.it { reverse_proxy web:8080 -} \ No newline at end of file +} + +git.softsand.it { + reverse_proxy server:3000 +} + diff --git a/docker-compose.yml b/docker-compose.yml index caf6a05..72fe03f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,30 +4,38 @@ services: context: . dockerfile: Dockerfile container_name: web - environment: + networks: + - caddy_shared + - ass5_net + environment: ASPNETCORE_ENVIRONMENT: Production + restart: always depends_on: - db expose: - "8080" - + db: image: postgres:16 container_name: db + networks: + - ass5_net environment: POSTGRES_DB: db POSTGRES_USER: user POSTGRES_PASSWORD: password - volumes: + volumes: - postgres_data:/var/lib/postgresql/data + restart: always expose: - "5432" - - proxy: + + caddy: image: caddy:2 - container_name: proxy - depends_on: - - web + networks: + - caddy_shared + container_name: caddy + restart: always ports: - "80:80" - "443:443" @@ -35,7 +43,14 @@ services: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data - caddy_config:/config + volumes: postgres_data: caddy_data: - caddy_config: \ No newline at end of file + caddy_config: + +networks: + caddy_shared: + external: true + ass5_net: + external: false