-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
126 lines (120 loc) · 3 KB
/
docker-compose-prod.yml
File metadata and controls
126 lines (120 loc) · 3 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Local setup building MicroPowerManager containers in production mode
services:
backend-prod:
container_name: backend-prod
build:
dockerfile: docker/DockerfileBackendProd
env_file:
- path: ./dev/.env.micropowermanager-backend
required: true
- path: .env.override.micropowermanager-backend
required: false
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
links:
- mysql:db
- redis:redis
ports:
- 8000:80
- 8443:443
volumes:
- storage_data:/var/www/html/storage
healthcheck:
test: [CMD, curl, -f, http://localhost/up]
start_period: 60s
interval: 30s
timeout: 10s
retries: 100
frontend-prod:
container_name: frontend-prod
build:
dockerfile: docker/DockerfileFrontendProd
env_file:
- path: ./dev/.env.micropowermanager-frontend
required: true
- path: .env.override.micropowermanager-frontend
required: false
ports:
- 8001:80
scheduler-prod:
container_name: scheduler-prod
build:
dockerfile: docker/DockerfileSchedulerProd
# micropowermanager-scheduler is a backend service and uses the same configuration as micropowermanager-backend
env_file:
- path: ./dev/.env.micropowermanager-backend
required: true
- path: .env.override.micropowermanager-backend
required: false
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
links:
- mysql:db
- redis:redis
volumes:
- storage_data:/var/www/html/storage
queue-worker-prod:
container_name: queue-worker-prod
build:
dockerfile: docker/DockerfileQueueWorkerProd
# micropowermanager-queue-worker is a backend service and uses the same configuration as micropowermanager-backend
env_file:
- path: ./dev/.env.micropowermanager-backend
required: true
- path: .env.override.micropowermanager-backend
required: false
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
links:
- mysql:db
- redis:redis
volumes:
- storage_data:/var/www/html/storage
redis:
container_name: redis
image: redis:5
volumes:
- redis_data:/data
ports:
- 6379:6379
networks:
default:
aliases:
- redis
mysql:
container_name: mysql
image: mysql:8.4
env_file:
- path: ./dev/.env.mysql
required: true
- path: .env.override.mysql
required: false
volumes:
- mysql_data:/var/lib/mysql
ports:
- 3306:3306
networks:
default:
aliases:
- db
- mysql
healthcheck:
test: [CMD, mysqladmin, ping, -h, localhost]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
mysql_data:
redis_data:
# storage volume is shared between services
storage_data: