Updated docker-compose files for use with Docker Caddy

Defined top level name for all services
Added proxy-net to services
Updated main service/server container service name to "app"
Updated hostname references to projectname-app-1
Updated docker Caddy caddyfile to reference container names
Updated docker Caddy caddyfile to use 192.168.1.234 instead of localhost for non-docker services
Adjusted caddyfile accordingly
This commit is contained in:
Chris King
2025-01-12 23:37:59 -08:00
parent 342559c8eb
commit 28c734c1d2
14 changed files with 119 additions and 61 deletions

View File

@@ -1,22 +1,26 @@
networks:
gitea:
external: false
proxy-net:
external: true
name: gitea
services:
server:
app:
image: gitea/gitea:latest
environment:
USER_UID: 141
USER_GID: 150
GITEA__database__DB_TYPE: postgres
GITEA__database__HOST: db:5432
GITEA__database__HOST: gitea-db-1:5432
GITEA__database__NAME: ${GITEA_DB_NAME}
GITEA__database__USER: ${GITEA_DB_USER}
GITEA__database__PASSWD__FILE: /run/secrets/postgres_pass
GITEA__server__SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE: gitea --config={{.CustomConf}} serv key-{{.Key.ID}}
restart: always
restart: unless-stopped
networks:
- gitea
- proxy-net
volumes:
- ./data/gitea:/data
- /home/git/.ssh/:/data/git/.ssh
@@ -32,7 +36,7 @@ services:
db:
image: postgres:14
restart: always
restart: unless-stopped
environment:
POSTGRES_USER: ${GITEA_DB_USER}
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_pass