mirror of
https://github.com/elyby/accounts.git
synced 2024-11-30 02:32:26 +05:30
f33439d829
Build nginx and mariadb together with the app image. Upgrade docker-compose configuration to 3 version. Add cleanup step to the gitlab-ci.
73 lines
1.4 KiB
YAML
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
|