This repository was archived by the owner on Nov 7, 2025. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
113 lines (107 loc) · 2.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
113 lines (107 loc) · 2.96 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
# Local development setup building MicroPowerManager containers in development mode
services:
backend-dev:
container_name: backend-dev
build:
dockerfile: docker/DockerfileBackendDev
env_file: ./dev/.env.micropowermanager-backend
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
links:
- mysql:db
- redis:redis
ports:
- 8000:80
- 8443:443
volumes:
- ./src/backend:/var/www/html
- backend_php_vendor:/var/www/html/vendor
- storage_data:/var/www/html/storage
healthcheck:
test: [CMD, curl, -f, http://localhost/up]
start_period: 60s
interval: 30s
timeout: 10s
retries: 100
frontend-dev:
container_name: frontend-dev
build:
dockerfile: docker/DockerfileFrontendDev
env_file: ./dev/.env.micropowermanager-frontend
ports:
- 8001:8080
volumes:
- ./src/frontend:/app/
- frontend_node_modules:/app/node_modules/
scheduler-dev:
container_name: scheduler-dev
build:
dockerfile: docker/DockerfileSchedulerDev
# micropowermanager-scheduler is a backend service and uses the same configuration as micropowermanager-backend
env_file: ./dev/.env.micropowermanager-backend
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
links:
- mysql:db
- redis:redis
volumes:
- ./src/backend:/var/www/html
- scheduler_php_vendor:/var/www/html/vendor
- storage_data:/var/www/html/storage
queue-worker-dev:
container_name: queue-worker-dev
build:
dockerfile: docker/DockerfileQueueWorkerDev
# micropowermanager-queue-worker is a backend service and uses the same configuration as micropowermanager-backend
env_file: ./dev/.env.micropowermanager-backend
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_started
links:
- mysql:db
- redis:redis
volumes:
- ./src/backend:/var/www/html
- queue_worker_php_vendor:/var/www/html/vendor
- storage_data:/var/www/html/storage
redis:
container_name: redis
image: redis:5
volumes:
- redis_data:/data
ports:
- 6379:6379
mysql:
container_name: mysql
image: mysql:8.4
env_file: ./dev/.env.mysql
volumes:
- mysql_data:/var/lib/mysql
ports:
- 3306:3306
healthcheck:
test: [CMD, mysqladmin, ping, -h, localhost]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes:
mysql_data:
redis_data:
# For local development we use a dedicated volume for each container
# to offload module and vendor directories. This avoids race
# conditions between different containers and local filesystem.
frontend_node_modules:
backend_php_vendor:
scheduler_php_vendor:
queue_worker_php_vendor:
# storage volume is shared between services
storage_data: