-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (69 loc) · 1.42 KB
/
docker-compose.yml
File metadata and controls
74 lines (69 loc) · 1.42 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
services:
app:
build:
context: ./docker/php
dockerfile: Dockerfile
args:
UID: 1001
GID: 1001
container_name: efomento-app
volumes:
- .:/var/www
depends_on:
mysql:
condition: service_healthy
networks:
- efomento
vite:
build:
context: ./docker/php
dockerfile: Dockerfile
args:
UID: 1001
GID: 1001
container_name: efomento-vite
ports:
- "5173:5173"
volumes:
- .:/var/www
command: ["sh", "-c", "cd /var/www && npm install && npm run dev"]
networks:
- efomento
nginx:
image: nginx:alpine
container_name: efomento-nginx
ports:
- "8080:80"
volumes:
- .:/var/www
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
networks:
- efomento
mysql:
image: mysql:8.0
container_name: efomento-mysql
environment:
MYSQL_DATABASE: efomento
MYSQL_USER: efomento
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
networks:
- efomento
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-psecret"]
interval: 5s
timeout: 5s
retries: 10
start_period: 30s
networks:
efomento:
driver: bridge
volumes:
mysql_data:
driver: local