Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
121 lines (114 loc) · 2.85 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
121 lines (114 loc) · 2.85 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
services:
# PHP-FPM Application
app:
build:
context: .
dockerfile: Dockerfile.dev
container_name: microhelium-app
restart: unless-stopped
working_dir: /var/www/html
volumes:
- .:/var/www/html
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/custom.ini
networks:
- microhelium
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
# Queue Worker (auto-judge jobs dispatched via App\Jobs\JudgeRunJob)
queue:
build:
context: .
dockerfile: Dockerfile.dev
container_name: microhelium-queue
restart: unless-stopped
working_dir: /var/www/html
command: php artisan queue:work --sleep=1 --tries=3 --max-time=3600
volumes:
- .:/var/www/html
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/custom.ini
networks:
- microhelium
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
# Nginx Web Server
webserver:
image: nginx:alpine
container_name: microhelium-webserver
restart: unless-stopped
ports:
- "8000:80"
volumes:
- .:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
networks:
- microhelium
depends_on:
- app
# MySQL Database
db:
image: mysql:8.0
container_name: microhelium-db
restart: unless-stopped
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: microhelium
MYSQL_USER: microhelium
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: rootsecret
volumes:
- microhelium-db:/var/lib/mysql
networks:
- microhelium
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 5s
retries: 10
# Redis Cache & Queue
redis:
image: redis:7-alpine
container_name: microhelium-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- microhelium-redis:/data
networks:
- microhelium
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
# Node.js for Vite
node:
# Issue #101: tests/Frontend/vue-loader.js uses module.registerHooks(),
# which only exists from Node 22.15. On Node 20 features.test.js dies at
# import time and eleven of the twenty-six frontend tests never run --
# while `node --test` reports one failed file, not eleven missing tests.
image: node:22-alpine
container_name: microhelium-node
working_dir: /var/www/html
volumes:
- .:/var/www/html
ports:
- "5173:5173"
networks:
- microhelium
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
tty: true
networks:
microhelium:
driver: bridge
volumes:
microhelium-db:
driver: local
microhelium-redis:
driver: local