accounts/docker-compose.prod.yml
ErickSkrauch f33439d829 Completely untie the backend from the frontend.
Build nginx and mariadb together with the app image.
Upgrade docker-compose configuration to 3 version.
Add cleanup step to the gitlab-ci.
2019-04-06 15:52:23 +02:00

73 lines
1.4 KiB
YAML

version: '3.4'
x-logging:
&default-logging
options:
max-size: 50m
services:
web:
image: registry.ely.by/elyby/accounts-nginx:latest
restart: always
depends_on:
- app
env_file: .env
volumes:
- ./frontend:/var/www/html/frontend
networks:
- default
- nginx-proxy
logging: *default-logging
app:
image: registry.ely.by/elyby/accounts:latest
restart: always
depends_on:
- db
- redis
env_file: .env
networks:
default:
aliases:
- php
logging: *default-logging
worker:
image: registry.ely.by/elyby/accounts:latest
restart: always
command: ['php', 'yii', 'queue/listen', '-v']
depends_on:
- db
- redis
env_file: .env
logging: *default-logging
cron:
image: registry.ely.by/elyby/accounts:latest
restart: always
command: ['crond', '-s', '/etc/cron.d', '-f', '-L', '/var/log/cron.log']
stop_signal: SIGKILL
depends_on:
- db
- redis
env_file: .env
logging: *default-logging
db:
image: registry.ely.by/elyby/accounts-mariadb:latest
restart: always
env_file: .env
volumes:
- ./data/mysql:/var/lib/mysql
redis:
image: redis:3.0-alpine
restart: always
volumes:
- ./data/redis:/data
networks:
nginx-proxy:
external:
name: nginx-proxy