Use merge references in compose
This commit is contained in:
parent
57b7345a62
commit
178833d478
1 changed files with 19 additions and 37 deletions
|
@ -59,69 +59,51 @@ services:
|
|||
# - '127.0.0.1:9200:9200'
|
||||
|
||||
mastodon_web:
|
||||
<<: &mastodon
|
||||
build: src
|
||||
image: local_mastodon
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
networks:
|
||||
- mastodon
|
||||
- nginx
|
||||
depends_on:
|
||||
- mastodon_db
|
||||
- mastodon_redis
|
||||
# - es
|
||||
container_name: mastodon_web
|
||||
build: src
|
||||
image: ghcr.io/mastodon/mastodon:v4.2.1
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||
networks:
|
||||
- mastodon
|
||||
- nginx
|
||||
healthcheck:
|
||||
# prettier-ignore
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
|
||||
ports:
|
||||
- '127.0.0.1:3000:3000'
|
||||
depends_on:
|
||||
- mastodon_db
|
||||
- mastodon_redis
|
||||
# - es
|
||||
volumes:
|
||||
- ./src/public/system:/mastodon/public/system
|
||||
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
|
||||
|
||||
mastodon_streaming:
|
||||
<<: *mastodon
|
||||
container_name: mastodon_streaming
|
||||
build: src
|
||||
image: ghcr.io/mastodon/mastodon:v4.2.1
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
environment:
|
||||
- PORT=5000
|
||||
command: node ./streaming
|
||||
networks:
|
||||
- mastodon
|
||||
- nginx
|
||||
healthcheck:
|
||||
# prettier-ignore
|
||||
test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1']
|
||||
ports:
|
||||
- '127.0.0.1:5000:5000'
|
||||
depends_on:
|
||||
- mastodon_db
|
||||
- mastodon_redis
|
||||
|
||||
{% for i in range(mastodon_sidekiq_count) %}
|
||||
mastodon_sidekiq_{{i}}:
|
||||
container_name: mastodon_sidekiq_{{i}}
|
||||
build: src
|
||||
image: ghcr.io/mastodon/mastodon:v4.2.1
|
||||
restart: always
|
||||
env_file: .env.production
|
||||
mastodon_sidekiq_{{ i }}:
|
||||
<<: *mastodon
|
||||
container_name: mastodon_sidekiq_{{ i }}
|
||||
environment:
|
||||
- DB_POOL={{ mastodon_sidekiq_threads}}
|
||||
command: bundle exec sidekiq -c {{ mastodon_sidekiq_threads}}
|
||||
depends_on:
|
||||
- mastodon_db
|
||||
- mastodon_redis
|
||||
networks:
|
||||
- mastodon
|
||||
- nginx
|
||||
- DB_POOL={{ mastodon_sidekiq_threads }}
|
||||
command: bundle exec sidekiq -c {{ mastodon_sidekiq_threads }}
|
||||
volumes:
|
||||
- ./src/public/system:/mastodon/public/system
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', "ps aux | grep '[s]idekiq\ 6' || false"]
|
||||
|
||||
{% endfor %}
|
||||
|
||||
## Uncomment to enable federation with tor instances along with adding the following ENV variables
|
||||
|
|
Loading…
Reference in a new issue