-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.prod.yml
71 lines (66 loc) · 1.76 KB
/
docker-compose.prod.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
version: "3.8"
services:
nginx:
image: ${DOCKER_HUB_USER}/${COMPOSE_PROJECT_NAME}-nginx:${IMAGE_TAG}
container_name: ${COMPOSE_PROJECT_NAME}-nginx
restart: unless-stopped
volumes:
- type: volume
source: storage
target: /usr/src/storage
ports:
- "${DOCKER_APP_PORT}:80"
depends_on:
- php
php:
image: ${DOCKER_HUB_USER}/${COMPOSE_PROJECT_NAME}-php:${IMAGE_TAG}
container_name: ${COMPOSE_PROJECT_NAME}-php
command: sh -c "cd /usr && ./wait-for-it.sh mysql:3306 -t 30 && ./wait-for-it.sh redis:6379 -t 30 && /usr/./update.sh && php-fpm"
restart: unless-stopped
volumes:
- ./.env:/usr/src/.env
- type: volume
source: storage
target: /usr/src/storage
depends_on:
- mysql
- redis
scheduler:
image: ${DOCKER_HUB_USER}/${COMPOSE_PROJECT_NAME}-scheduler:${IMAGE_TAG}
container_name: ${COMPOSE_PROJECT_NAME}-scheduler
restart: unless-stopped
volumes:
- ./.env:/usr/src/.env
- type: volume
source: storage
target: /usr/src/storage
depends_on:
- php
- mysql
- redis
mysql:
image: ${DOCKER_HUB_USER}/${COMPOSE_PROJECT_NAME}-mysql:${IMAGE_TAG}
container_name: ${COMPOSE_PROJECT_NAME}-mysql
restart: unless-stopped
volumes:
- type: volume
source: mysqldata
target: /var/lib/mysql
ports:
- "${DOCKER_DB_PORT}:3306"
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
redis:
image: redis:7.0.11-alpine
container_name: ${COMPOSE_PROJECT_NAME}-redis
restart: unless-stopped
volumes:
- type: volume
source: redisdata
target: /data
ports:
- "${DOCKER_REDIS_PORT}:6379"
volumes:
storage:
mysqldata:
redisdata: