-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
100 lines (93 loc) · 2.65 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: '3'
services:
nginx:
image: nginx
container_name: nginx
restart: always
ports:
- 80:80
environment:
APP_HOST: ${APP_HOST}
PHP_FPM_HOST: php-fpm
command: /bin/bash -c "mkdir -p /var/www && ln -fns /var/app/src/webloyer /var/www/webloyer && envsubst '$$APP_HOST $$PHP_FPM_HOST' < /etc/nginx/conf.d/webloyer.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
volumes:
- src:/var/app/src/webloyer # TODO stop symlink to vendor and use static-content
# - static-content:/var/www/webloyer/public
- ./containers/nginx/webloyer.template:/etc/nginx/conf.d/webloyer.template
depends_on:
- php-fpm
php-fpm:
container_name: php-fpm
restart: always
build: ./containers/php-fpm
environment:
APP_URL: ${APP_URL}
DB_HOST: mysql
DB_DATABASE: ${MYSQL_DATABASE}
DB_USERNAME: ${MYSQL_USER}
DB_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- src:/var/app/src/webloyer
# - static-content:/var/www/webloyer/public
- ./wait-for-it.sh:/usr/local/bin/wait-for-it
depends_on:
- mysql
php-scheduler:
container_name: php-scheduler
restart: always
build: ./containers/php-scheduler
environment:
APP_URL: ${APP_URL}
DB_HOST: mysql
DB_DATABASE: ${MYSQL_DATABASE}
DB_USERNAME: ${MYSQL_USER}
DB_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- src:/var/app/src/webloyer
depends_on:
- php-fpm
php-worker:
container_name: php-worker
restart: always
build: ./containers/php-worker
environment:
APP_URL: ${APP_URL}
DB_HOST: mysql
DB_DATABASE: ${MYSQL_DATABASE}
DB_USERNAME: ${MYSQL_USER}
DB_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- src:/var/app/src/webloyer
depends_on:
- php-fpm
mysql:
image: mysql:5.7
container_name: mysql
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- mysql-data:/var/lib/mysql
- ./containers/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./containers/mysql/sql:/docker-entrypoint-initdb.d
# smtp:
# image: "catatnight/postfix"
# container_name: smtp
# restart: always
# ports:
# - 587:587
# environment:
# maildomain: ${SMTP_DOMAIN}
# smtp_user: ${SMTP_USER}:${SMTP_PASSWORD}
# volumes:
# - ./containers/smtp/certs:/etc/postfix/certs
volumes:
src:
# static-content:
mysql-data: