foreman/docker-compose.yml @ develop
89465aaf | Ohad Levy | version: '3.4'
|
|
services:
|
|||
db:
|
|||
environment:
|
|||
c889ebb8 | Ohad Levy | - POSTGRES_USER=foreman
|
|
- POSTGRES_PASSWORD=foreman
|
|||
- POSTGRES_DATABASE=foreman
|
|||
- PGDATA=/var/lib/postgresql/data/pgdata
|
|||
89465aaf | Ohad Levy | hostname: db.example.com
|
|
060eb9b3 | Ewoud Kohl van Wijngaarden | image: postgres:12
|
|
89465aaf | Ohad Levy | ports:
|
|
060eb9b3 | Ewoud Kohl van Wijngaarden | - '5432'
|
|
89465aaf | Ohad Levy | restart: always
|
|
healthcheck:
|
|||
c889ebb8 | Ohad Levy | test: ["CMD-SHELL", "nc -z 127.0.0.1 5432 || exit 1"]
|
|
89465aaf | Ohad Levy | interval: 30s
|
|
timeout: 30s
|
|||
retries: 3
|
|||
volumes:
|
|||
c889ebb8 | Ohad Levy | - db:/var/lib/postgresql/data
|
|
89465aaf | Ohad Levy | ||
app: &app_base
|
|||
7246f6f8 | Ohad Levy | image: quay.io/foreman/foreman:develop
|
|
89465aaf | Ohad Levy | command: bundle exec bin/rails server -b 0.0.0.0
|
|
build:
|
|||
context: .
|
|||
environment:
|
|||
c889ebb8 | Ohad Levy | - DATABASE_URL=postgres://foreman:foreman@db/foreman?pool=5
|
|
89465aaf | Ohad Levy | - RAILS_MAX_THREADS=5
|
|
- RAILS_ENV=production
|
|||
a3ef3bb6 | Ohad Levy | - FOREMAN_FQDN=foreman.example.com
|
|
- FOREMAN_DOMAIN=example.com
|
|||
- FOREMAN_RAILS_CACHE_STORE_TYPE=redis
|
|||
d153a598 | Jannis Warnat | - FOREMAN_RAILS_CACHE_STORE_URLS=redis://redis-cache:6379/0
|
|
b82860e5 | Adam Ruzicka | - DYNFLOW_REDIS_URL=redis://redis-tasks:6379/0
|
|
- REDIS_PROVIDER=DYNFLOW_REDIS_URL
|
|||
89465aaf | Ohad Levy | hostname: foreman.example.com
|
|
links:
|
|||
- db
|
|||
b82860e5 | Adam Ruzicka | - redis-cache
|
|
- redis-tasks
|
|||
89465aaf | Ohad Levy | ports:
|
|
- "${MY_DOCKER_IP:-127.0.0.1}:3000:3000"
|
|||
- "${MY_DOCKER_IP:-127.0.0.1}:5910-5930:5910-5930"
|
|||
restart: always
|
|||
healthcheck:
|
|||
test: ["CMD-SHELL", "nc -z 127.0.0.1 3000 || exit 1"]
|
|||
interval: 5m
|
|||
start_period: 1m
|
|||
b82860e5 | Adam Ruzicka | orchestrator:
|
|
<<: *app_base
|
|||
command: bundle exec sidekiq -r ./extras/dynflow-sidekiq.rb -c 1 -q dynflow_orchestrator
|
|||
hostname: orchestrator.example.com
|
|||
ports: []
|
|||
89465aaf | Ohad Levy | worker:
|
|
<<: *app_base
|
|||
c080a565 | Adam Ruzicka | command: bundle exec sidekiq -r ./extras/dynflow-sidekiq.rb -c 15 -q default,1 -q remote_execution,1
|
|
b82860e5 | Adam Ruzicka | ports: []
|
|
redis-cache:
|
|||
image: redis
|
|||
89465aaf | Ohad Levy | ||
b82860e5 | Adam Ruzicka | redis-tasks:
|
|
a3ef3bb6 | Ohad Levy | image: redis
|
|
b82860e5 | Adam Ruzicka | command: redis-server --appendonly yes
|
|
volumes:
|
|||
- redis-persistent:/data
|
|||
a3ef3bb6 | Ohad Levy | ||
89465aaf | Ohad Levy | volumes:
|
|
db:
|
|||
b82860e5 | Adam Ruzicka | redis-persistent:
|