mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-01 16:54:35 +01:00
85 lines
2.0 KiB
Django/Jinja
85 lines
2.0 KiB
Django/Jinja
version: '3'
|
|
services:
|
|
database:
|
|
restart: always
|
|
image: postgres:14-alpine
|
|
shm_size: 256mb
|
|
networks:
|
|
- internal_network
|
|
healthcheck:
|
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
|
volumes:
|
|
- database:/var/lib/postgresql/data
|
|
environment:
|
|
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
|
logging:
|
|
driver: journald
|
|
|
|
{% include 'templates/docker-redis-service.yml.j2' %}
|
|
|
|
networks:
|
|
- internal_network
|
|
|
|
web:
|
|
image: tootsuite/mastodon:{{version_mastodon}}
|
|
restart: always
|
|
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
|
|
healthcheck:
|
|
# prettier-ignore
|
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
|
ports:
|
|
- "127.0.0.1:{{http_port}}:3000"
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
volumes:
|
|
- data:/mastodon/public/system
|
|
logging:
|
|
driver: journald
|
|
streaming:
|
|
image: tootsuite/mastodon:{{version_mastodon}}
|
|
restart: always
|
|
env_file: .env.production
|
|
command: node ./streaming
|
|
networks:
|
|
- external_network
|
|
- internal_network
|
|
healthcheck:
|
|
# prettier-ignore
|
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
|
ports:
|
|
- "127.0.0.1:{{stream_port}}:4000"
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
logging:
|
|
driver: journald
|
|
sidekiq:
|
|
image: tootsuite/mastodon:{{version_mastodon}}
|
|
restart: always
|
|
env_file: .env.production
|
|
command: bundle exec sidekiq
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
networks:
|
|
- external_network
|
|
- internal_network
|
|
volumes:
|
|
- data:/mastodon/public/system
|
|
healthcheck:
|
|
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
|
logging:
|
|
driver: journald
|
|
volumes:
|
|
database:
|
|
redis:
|
|
data:
|
|
networks:
|
|
external_network:
|
|
internal_network:
|
|
internal: true |