change services for traefik support
This commit is contained in:
parent
0b60fba148
commit
f175f716a5
4 changed files with 57 additions and 33 deletions
|
@ -5,7 +5,7 @@ services:
|
|||
image: postgres:14-alpine
|
||||
shm_size: 256mb
|
||||
networks:
|
||||
- internal_network
|
||||
- default
|
||||
healthcheck:
|
||||
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||
volumes:
|
||||
|
@ -20,7 +20,7 @@ services:
|
|||
restart: always
|
||||
image: redis:7-alpine
|
||||
networks:
|
||||
- internal_network
|
||||
- default
|
||||
healthcheck:
|
||||
test: ['CMD', 'redis-cli', 'ping']
|
||||
volumes:
|
||||
|
@ -34,8 +34,8 @@ services:
|
|||
env_file: .env.production
|
||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
- default
|
||||
- traefik
|
||||
healthcheck:
|
||||
# prettier-ignore
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||
|
@ -45,9 +45,16 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
# - es
|
||||
volumes:
|
||||
- /data/mastodon/public/system:/mastodon/public/system
|
||||
labels:
|
||||
- traefik.http.routers.mastodon.entrypoints=websecure
|
||||
- traefik.http.routers.mastodon.rule=Host(`social.pizzapim.nl`)
|
||||
- traefik.http.routers.mastodon.tls=true
|
||||
- traefik.http.routers.mastodon.tls.certresolver=pizzapim
|
||||
- traefik.http.services.mastodon.loadbalancer.server.port=3000
|
||||
- traefik.http.routers.mastodon.service=mastodon
|
||||
- traefik.docker.network=traefik
|
||||
|
||||
streaming:
|
||||
image: tootsuite/mastodon:v3.5.3
|
||||
|
@ -55,8 +62,8 @@ services:
|
|||
env_file: .env.production
|
||||
command: node ./streaming
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
- default
|
||||
- traefik
|
||||
healthcheck:
|
||||
# prettier-ignore
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
||||
|
@ -66,6 +73,12 @@ services:
|
|||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
labels:
|
||||
- traefik.http.routers.mastodon-streaming.entrypoints=websecure
|
||||
- "traefik.http.routers.mastodon-streaming.rule=(Host(`social.pizzapim.nl`) && PathPrefix(`/api/v1/streaming`))"
|
||||
- traefik.http.routers.mastodon-streaming.service=mastodon-streaming
|
||||
- traefik.http.services.mastodon-streaming.loadbalancer.server.port=4000
|
||||
- traefik.docker.network=traefik
|
||||
|
||||
sidekiq:
|
||||
image: tootsuite/mastodon:v3.5.3
|
||||
|
@ -76,14 +89,12 @@ services:
|
|||
- db
|
||||
- redis
|
||||
networks:
|
||||
- external_network
|
||||
- internal_network
|
||||
- default
|
||||
volumes:
|
||||
- /data/mastodon/public/system:/mastodon/public/system
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||
|
||||
networks:
|
||||
external_network:
|
||||
internal_network:
|
||||
internal: true
|
||||
traefik:
|
||||
external: true
|
||||
|
|
Reference in a new issue