1
0
Fork 0

sort out networks, snibox: serve static files by caddy

This commit is contained in:
Lukáš Kucharczyk 2023-01-26 09:46:20 +01:00
parent 998a1598ac
commit ac53f32587
1 changed files with 61 additions and 18 deletions

View File

@ -9,6 +9,8 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock" - "/var/run/docker.sock:/var/run/docker.sock"
ports: ports:
- "${UPTIME_KUMA_EXTERNAL_PORT}:${UPTIME_KUMA_INTERNAL_PORT}" - "${UPTIME_KUMA_EXTERNAL_PORT}:${UPTIME_KUMA_INTERNAL_PORT}"
networks:
- public
profiles: profiles:
- infra - infra
- base - base
@ -19,6 +21,8 @@ services:
container_name: logseq container_name: logseq
ports: ports:
- "${LOGSEQ_EXTERNAL_PORT}:${LOGSEQ_INTERNAL_PORT}" - "${LOGSEQ_EXTERNAL_PORT}:${LOGSEQ_INTERNAL_PORT}"
networks:
- public
profiles: profiles:
- base - base
@ -28,6 +32,7 @@ services:
ports: ports:
- "${TIMETRACKER_EXTERNAL_PORT}:${TIMETRACKER_INTERNAL_PORT}" - "${TIMETRACKER_EXTERNAL_PORT}:${TIMETRACKER_INTERNAL_PORT}"
- "${DENDRON_NOTES_EXTERNAL_PORT}:${DENDRON_NOTES_INTERNAL_PORT}" - "${DENDRON_NOTES_EXTERNAL_PORT}:${DENDRON_NOTES_INTERNAL_PORT}"
- "${SNIBOX_EXTERNAL_PORT}:${SNIBOX_INTERNAL_PORT}"
user: ${PUID} user: ${PUID}
volumes: volumes:
- "${DOCKER_STORAGE_PATH}/caddy/data:/data" - "${DOCKER_STORAGE_PATH}/caddy/data:/data"
@ -36,6 +41,10 @@ services:
# - "${DOCKER_STORAGE_PATH}/caddy/srv:/srv" # - "${DOCKER_STORAGE_PATH}/caddy/srv:/srv"
- "/www/notes:/srv/notes" - "/www/notes:/srv/notes"
- "timetracker-static:/srv/timetracker" - "timetracker-static:/srv/timetracker"
- "snibox-static:/srv/snibox"
networks:
- public
- caddy
profiles: profiles:
- infra - infra
- base - base
@ -53,6 +62,8 @@ services:
- "timetracker-static:/home/timetracker/app/static" - "timetracker-static:/home/timetracker/app/static"
depends_on: depends_on:
- caddy - caddy
networks:
- caddy
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -70,6 +81,8 @@ services:
- "${DOKKU_EXTERNAL_PORT_1}:${DOKKU_INTERNAL_PORT_1}" - "${DOKKU_EXTERNAL_PORT_1}:${DOKKU_INTERNAL_PORT_1}"
- "${DOKKU_EXTERNAL_PORT_2}:${DOKKU_INTERNAL_PORT_2}" - "${DOKKU_EXTERNAL_PORT_2}:${DOKKU_INTERNAL_PORT_2}"
- "${DOKKU_EXTERNAL_PORT_3}:${DOKKU_INTERNAL_PORT_3}" - "${DOKKU_EXTERNAL_PORT_3}:${DOKKU_INTERNAL_PORT_3}"
networks:
- public
profiles: profiles:
- disabled - disabled
@ -79,10 +92,12 @@ services:
restart: always restart: always
environment: environment:
- TRILIUM_DATA_DIR=/home/node/trilium-data - TRILIUM_DATA_DIR=/home/node/trilium-data
ports:
- "${TRILIUM_EXTERNAL_PORT}:${TRILIUM_INTERNAL_PORT}"
volumes: volumes:
- ${DOCKER_STORAGE_PATH}/trilium:/home/node/trilium-data - ${DOCKER_STORAGE_PATH}/trilium:/home/node/trilium-data
ports:
- "${TRILIUM_EXTERNAL_PORT}:${TRILIUM_INTERNAL_PORT}"
networks:
- public
profiles: profiles:
- base - base
@ -99,6 +114,8 @@ services:
- "${DOCKER_STORAGE_PATH}/ntfy/config:/etc/ntfy" - "${DOCKER_STORAGE_PATH}/ntfy/config:/etc/ntfy"
ports: ports:
- "${NTFY_EXTERNAL_PORT}:${NTFY_INTERNAL_PORT}" - "${NTFY_EXTERNAL_PORT}:${NTFY_INTERNAL_PORT}"
networks:
- public
profiles: profiles:
- base - base
- infra - infra
@ -118,6 +135,8 @@ services:
- "${CHANGEDETECTION_EXTERNAL_PORT}:${CHANGEDETECTION_INTERNAL_PORT}" - "${CHANGEDETECTION_EXTERNAL_PORT}:${CHANGEDETECTION_INTERNAL_PORT}"
depends_on: depends_on:
- browserless - browserless
networks:
- public
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -130,6 +149,8 @@ services:
- "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]" - "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]"
ports: ports:
- "3100:3000" - "3100:3000"
networks:
- public
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -148,6 +169,8 @@ services:
- "${DOCKER_STORAGE_PATH}/audiobookshelf/metadata:/metadata" - "${DOCKER_STORAGE_PATH}/audiobookshelf/metadata:/metadata"
ports: ports:
- "${AUDIOBOOKSHELF_EXTERNAL_PORT}:${AUDIOBOOKSHELF_INTERNAL_PORT}" - "${AUDIOBOOKSHELF_EXTERNAL_PORT}:${AUDIOBOOKSHELF_INTERNAL_PORT}"
networks:
- public
profiles: profiles:
- disabled - disabled
restart: unless-stopped restart: unless-stopped
@ -165,6 +188,8 @@ services:
- "${STORAGE_PATH}/download/music:/downloads" - "${STORAGE_PATH}/download/music:/downloads"
ports: ports:
- 8337:8337 - 8337:8337
networks:
- public
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -183,6 +208,8 @@ services:
ports: ports:
- "8112:8112" - "8112:8112"
- "58846:58846" - "58846:58846"
networks:
- public
profiles: profiles:
- disabled - disabled
restart: unless-stopped restart: unless-stopped
@ -199,6 +226,8 @@ services:
- "${STORAGE_PATH}:/srv" - "${STORAGE_PATH}:/srv"
ports: ports:
- "9999:80" - "9999:80"
networks:
- public
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -206,8 +235,6 @@ services:
mealie: mealie:
container_name: mealie container_name: mealie
image: hkotel/mealie:latest image: hkotel/mealie:latest
ports:
- ${MEALIE_EXTERNAL_PORT}:${MEALIE_INTERNAL_PORT}
environment: environment:
PUID: ${PUID} PUID: ${PUID}
PGID: ${PGID} PGID: ${PGID}
@ -216,6 +243,10 @@ services:
- mealie.env - mealie.env
volumes: volumes:
- "${DOCKER_STORAGE_PATH}/mealie/data/:/app/data" - "${DOCKER_STORAGE_PATH}/mealie/data/:/app/data"
ports:
- ${MEALIE_EXTERNAL_PORT}:${MEALIE_INTERNAL_PORT}
networks:
- public
restart: unless-stopped restart: unless-stopped
rtorrent: rtorrent:
@ -235,6 +266,8 @@ services:
- "9443:9443" - "9443:9443"
- "8118:8118" - "8118:8118"
- "6881:6881" - "6881:6881"
networks:
- public
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -249,6 +282,8 @@ services:
volumes: volumes:
- "${STORAGE_PATH}/media/comics:/manga" - "${STORAGE_PATH}/media/comics:/manga"
- "${DOCKER_STORAGE_PATH}/kavita:/kavita/config" - "${DOCKER_STORAGE_PATH}/kavita:/kavita/config"
networks:
- public
profiles: profiles:
- base - base
restart: unless-stopped restart: unless-stopped
@ -265,6 +300,8 @@ services:
- "${DOCKER_STORAGE_PATH}/webhook/scripts:/var/webhook" - "${DOCKER_STORAGE_PATH}/webhook/scripts:/var/webhook"
ports: ports:
- "${WEBHOOK_EXTERNAL_PORT}:${WEBHOOK_INTERNAL_PORT}" - "${WEBHOOK_EXTERNAL_PORT}:${WEBHOOK_INTERNAL_PORT}"
networks:
- public
profiles: profiles:
- base - base
- infra - infra
@ -282,6 +319,8 @@ services:
- ${VALHEIM_EXTERNAL_PORT}:${VALHEIM_INTERNAL_PORT} - ${VALHEIM_EXTERNAL_PORT}:${VALHEIM_INTERNAL_PORT}
cap_add: cap_add:
- SYS_NICE - SYS_NICE
networks:
- public
profiles: profiles:
- disabled - disabled
restart: unless-stopped restart: unless-stopped
@ -295,6 +334,8 @@ services:
ports: ports:
- 26900-26902:26900-26902/udp - 26900-26902:26900-26902/udp
- 18500:8080 - 18500:8080
networks:
- public
profiles: profiles:
- disabled - disabled
restart: unless-stopped restart: unless-stopped
@ -307,9 +348,14 @@ services:
volumes: volumes:
- snibox-static:/var/www/html - snibox-static:/var/www/html
networks: networks:
- default - public
depends_on: # served by caddy
- snibox_backend # - snibox
profiles:
# static files are served by caddy
- disabled
# depends_on:
# - snibox_backend
snibox_backend: snibox_backend:
image: snibox/snibox:latest image: snibox/snibox:latest
@ -330,23 +376,20 @@ services:
# MAILGUN_API_KEY: "${MAILGUN_API_KEY}" # MAILGUN_API_KEY: "${MAILGUN_API_KEY}"
# MAILGUN_DOMAIN: "${MAILGUN_DOMAIN}" # MAILGUN_DOMAIN: "${MAILGUN_DOMAIN}"
# MAILGUN_PUBLIC_KEY: "${MAILGUN_PUBLIC_KEY}" # MAILGUN_PUBLIC_KEY: "${MAILGUN_PUBLIC_KEY}"
# ports:
# - "${SNIBOX_EXTERNAL_PORT}:${SNIBOX_INTERNAL_PORT}"
volumes: volumes:
- snibox-static:/app/public - snibox-static:/app/public
networks: networks:
- default - caddy
- postgres - postgres
# depends_on: # served by caddy
# - database # - snibox
# database:
# image: postgres:10.7-alpine
# volumes:
# - pg-data:/var/lib/postgresql/data
networks: networks:
default: caddy:
attachable: true
internal: true
public:
attachable: true
postgres: postgres:
external: true external: true