docker-compose updates
This commit is contained in:
parent
b9ad92b539
commit
b4d3acc18a
|
@ -0,0 +1,125 @@
|
||||||
|
# docker-compose.production.yml
|
||||||
|
# docker-compose build -f docker-compose.production.yml
|
||||||
|
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
|
||||||
|
redis:
|
||||||
|
restart: always
|
||||||
|
image: redis:5.0-alpine
|
||||||
|
networks:
|
||||||
|
- internal_network
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
volumes:
|
||||||
|
- ./redis:/data
|
||||||
|
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
image: gab/social
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
command: bash -c "rm -f /gabsocial/tmp/pids/server.pid; bundle exec rails s -p 3000 -b '0.0.0.0'"
|
||||||
|
user: gabsocial
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget -q --spider --header 'x-forwarded-proto: https' --proxy=off localhost:3000/api/v1/instance || exit 1"]
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:3000:3000"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
# - es
|
||||||
|
volumes:
|
||||||
|
- /mnt/md0/assets:/gabsocial/public/system:Z
|
||||||
|
|
||||||
|
streaming:
|
||||||
|
build: .
|
||||||
|
image: gab/social
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
command: yarn start
|
||||||
|
user: gabsocial
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "wget -q --spider --header 'x-forwarded-proto: https' --proxy=off localhost:4000/api/v1/streaming/health || exit 1"]
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:4000:4000"
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
|
||||||
|
sidekiq-default:
|
||||||
|
build: .
|
||||||
|
image: gab/social
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
environment:
|
||||||
|
- DB_POOL=15
|
||||||
|
command: bundle exec sidekiq -q default -c 3
|
||||||
|
user: gabsocial
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
volumes:
|
||||||
|
- /mnt/md0/assets:/gabsocial/public/system:Z
|
||||||
|
|
||||||
|
sidekiq-mailers:
|
||||||
|
build: .
|
||||||
|
image: gab/social
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
environment:
|
||||||
|
- DB_POOL=5
|
||||||
|
command: bundle exec sidekiq -q mailers -c 3
|
||||||
|
user: gabsocial
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
volumes:
|
||||||
|
- /mnt/md0/assets:/gabsocial/public/system:Z
|
||||||
|
|
||||||
|
sidekiq-push:
|
||||||
|
build: .
|
||||||
|
image: gab/social
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
environment:
|
||||||
|
- DB_POOL=10
|
||||||
|
command: bundle exec sidekiq -q push -c 3
|
||||||
|
user: gabsocial
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
volumes:
|
||||||
|
- /mnt/md0/assets:/gabsocial/public/system:Z
|
||||||
|
|
||||||
|
sidekiq-pull:
|
||||||
|
build: .
|
||||||
|
image: gab/social
|
||||||
|
restart: always
|
||||||
|
env_file: .env.production
|
||||||
|
environment:
|
||||||
|
- DB_POOL=10
|
||||||
|
command: bundle exec sidekiq -q pull -c 3
|
||||||
|
user: gabsocial
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
networks:
|
||||||
|
- external_network
|
||||||
|
- internal_network
|
||||||
|
volumes:
|
||||||
|
- /mnt/md0/assets:/gabsocial/public/system:Z
|
||||||
|
|
||||||
|
networks:
|
||||||
|
external_network:
|
||||||
|
internal_network:
|
||||||
|
internal: true
|
|
@ -1,15 +1,15 @@
|
||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# db:
|
db:
|
||||||
# restart: always
|
restart: always
|
||||||
# image: postgres:9.6-alpine
|
image: postgres:9.6-alpine
|
||||||
# networks:
|
networks:
|
||||||
# - internal_network
|
- internal_network
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: ["CMD", "pg_isready", "-U", "postgres"]
|
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||||
# volumes:
|
volumes:
|
||||||
# - ./postgres:/var/lib/postgresql/data
|
- ./postgres:/var/lib/postgresql/data
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -47,7 +47,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:3000:3000"
|
- "127.0.0.1:3000:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
# - db
|
- db
|
||||||
- redis
|
- redis
|
||||||
# - es
|
# - es
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -67,7 +67,7 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:4000:4000"
|
- "127.0.0.1:4000:4000"
|
||||||
depends_on:
|
depends_on:
|
||||||
# - db
|
- db
|
||||||
- redis
|
- redis
|
||||||
|
|
||||||
sidekiq:
|
sidekiq:
|
||||||
|
@ -77,7 +77,7 @@ services:
|
||||||
env_file: .env.production
|
env_file: .env.production
|
||||||
command: bundle exec sidekiq
|
command: bundle exec sidekiq
|
||||||
depends_on:
|
depends_on:
|
||||||
# - db
|
- db
|
||||||
- redis
|
- redis
|
||||||
networks:
|
networks:
|
||||||
- external_network
|
- external_network
|
||||||
|
|
Loading…
Reference in New Issue