-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
70 lines (70 loc) · 1.5 KB
/
docker-compose.yml
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
version: "3"
services:
mariadb:
image: "mariadb:10"
ports:
- "${FORWARD_DB_PORT:-3306}:3306"
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_USER: "${DB_USER}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
volumes:
- "vwprog-mariadb:/var/lib/mysql"
networks:
- vwprog-net
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
phpmyadmin:
image: phpmyadmin/phpmyadmin
links:
- mariadb:mariadb
ports:
- "8000:80"
environment:
PMA_USER: "${DB_USER}"
PMA_PASSWORD: "${DB_PASSWORD}"
PMA_HOST: mariadb
PMA_ARBITRARY: 0
networks:
- vwprog-net
vwprg-backend:
build: backend/.
command: bash -c "npm install && npm run dev"
ports:
- "8080:8080"
env_file:
- .env
volumes:
- ./backend/:/usr/src/app
- /usr/app/node_modules
networks:
- vwprog-net
depends_on:
mariadb:
condition: service_healthy
vwprg-frontend:
image: node:16
working_dir: /usr/src/app
command: bash -c "npm install && npm run dev"
env_file:
- .env
ports:
- "80:4173"
environment:
VITE_BACKEND_URL: ${VITE_BACKEND_URL}
STATUS: "${STATUS}"
volumes:
- ./frontend/:/usr/src/app
networks:
- vwprog-net
depends_on:
- vwprg-backend
networks:
vwprog-net:
driver: bridge
volumes:
vwprog-mariadb:
driver: local