-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
97 lines (91 loc) · 2.01 KB
/
docker-compose.dev.yml
File metadata and controls
97 lines (91 loc) · 2.01 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
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
# 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:
image: node:20-alpine
container_name: microhelium-node
working_dir: /var/www/html
volumes:
- .:/var/www/html
ports:
- "15173: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