update docker-compose
This commit is contained in:
parent
e27a951f22
commit
9967b317a2
1 changed files with 32 additions and 21 deletions
|
@ -2,16 +2,18 @@ version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgresql:
|
postgresql:
|
||||||
|
restart: always
|
||||||
image: postgres:14-alpine
|
image: postgres:14-alpine
|
||||||
env_file: env.production
|
env_file: env.production
|
||||||
restart: always
|
shm_size: 256mb
|
||||||
shm_size: 256mb
|
networks:
|
||||||
|
- internal_network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
test: ['CMD', 'pg_isready', '-U', 'postgres']
|
||||||
volumes:
|
volumes:
|
||||||
- postgresql:/var/lib/postgresql/data
|
- postgresql:/var/lib/postgresql/data
|
||||||
networks:
|
environment:
|
||||||
- internal_network
|
- 'POSTGRES_HOST_AUTH_METHOD=trust'
|
||||||
|
|
||||||
# pgbouncer:
|
# pgbouncer:
|
||||||
# image: edoburu/pgbouncer:1.12.0
|
# image: edoburu/pgbouncer:1.12.0
|
||||||
|
@ -24,14 +26,14 @@ services:
|
||||||
# - internal_network
|
# - internal_network
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
|
||||||
restart: always
|
restart: always
|
||||||
|
image: redis:7-alpine
|
||||||
|
networks:
|
||||||
|
- internal_network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD', 'redis-cli', 'ping']
|
test: ['CMD', 'redis-cli', 'ping']
|
||||||
volumes:
|
volumes:
|
||||||
- redis:/data
|
- redis:/data
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
|
|
||||||
redis-volatile:
|
redis-volatile:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
|
@ -63,26 +65,30 @@ services:
|
||||||
- internal_network
|
- internal_network
|
||||||
{% endif %}
|
{% endif %}
|
||||||
website:
|
website:
|
||||||
image: tootsuite/mastodon:latest
|
build: .
|
||||||
|
restart: always
|
||||||
|
#image: tootsuite/mastodon:latest
|
||||||
|
image: ghcr.io/mastodon/mastodon
|
||||||
env_file:
|
env_file:
|
||||||
- env.production
|
- env.production
|
||||||
command: bash -c "bundle exec rails s -p 3000"
|
#command: bash -c "bundle exec rails s -p 3000"
|
||||||
restart: always
|
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
healthcheck:
|
||||||
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||||
|
ports:
|
||||||
|
- '127.0.0.1:3000:3000'
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgresql
|
- postgresql
|
||||||
# - pgbouncer
|
# - pgbouncer
|
||||||
- redis
|
- redis
|
||||||
- redis-volatile
|
- redis-volatile
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
ports:
|
|
||||||
- '127.0.0.1:3000:3000'
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
- external_network
|
|
||||||
healthcheck:
|
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/mastodon/public/system
|
#- uploads:/mastodon/public/system
|
||||||
|
- ./public/system:/mastodon/public/system
|
||||||
|
|
||||||
shell:
|
shell:
|
||||||
image: tootsuite/mastodon:latest
|
image: tootsuite/mastodon:latest
|
||||||
|
@ -97,7 +103,9 @@ services:
|
||||||
- uploads:/mastodon/public/system
|
- uploads:/mastodon/public/system
|
||||||
|
|
||||||
streaming:
|
streaming:
|
||||||
image: tootsuite/mastodon:latest
|
build: .
|
||||||
|
image: ghcr.io/mastodon/mastodon
|
||||||
|
#image: tootsuite/mastodon:latest
|
||||||
env_file:
|
env_file:
|
||||||
- env.production
|
- env.production
|
||||||
command: node ./streaming
|
command: node ./streaming
|
||||||
|
@ -117,7 +125,9 @@ services:
|
||||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
image: tootsuite/mastodon:latest
|
build: .
|
||||||
|
image: ghcr.io/mastodon/mastodon
|
||||||
|
#image: tootsuite/mastodon:latest
|
||||||
env_file:
|
env_file:
|
||||||
- env.production
|
- env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
|
@ -134,7 +144,8 @@ services:
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/mastodon/public/system
|
#- uploads:/mastodon/public/system
|
||||||
|
- ./public/system:/mastodon/public/system
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
external_network:
|
external_network:
|
||||||
|
|
Loading…
Reference in a new issue