-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod.yml
67 lines (66 loc) · 1.8 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
version: "3"
services:
database:
container_name: ${DOCKER_NAME}-db
image: mysql:8.0
ports:
- "13309:3306"
volumes:
- .docker/mysql/data:/var/lib/mysql
environment:
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
app:
build: .
image: ${DOCKER_NAME}-app
container_name: ${DOCKER_NAME}-app
sysctls:
- net.ipv4.ip_unprivileged_port_start=0
depends_on:
- database
- redis
ports:
- "8080:8080"
links:
- database:database
- redis:redis
volumes:
# - .:/srv/app
- ./storage:/srv/app/storage
- ./.env:/srv/app/.env
environment:
CONTAINER_ROLE: app
CONTAINER_ENV: local
redis:
container_name: ${DOCKER_NAME}-redis
image: centos/redis-5-centos7
ports:
- "6379:6379"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
scheduler:
image: ${DOCKER_NAME}-app
container_name: ${DOCKER_NAME}-scheduler
sysctls:
- net.ipv4.ip_unprivileged_port_start=0
depends_on:
- app
volumes:
- .:/srv/app
environment:
CONTAINER_ROLE: scheduler
CONTAINER_ENV: local
queue:
image: ${DOCKER_NAME}-app
container_name: ${DOCKER_NAME}-queue
sysctls:
- net.ipv4.ip_unprivileged_port_start=0
depends_on:
- app
volumes:
- .:/srv/app
environment:
CONTAINER_ROLE: queue
CONTAINER_ENV: local