-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (57 loc) · 1.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (57 loc) · 1.34 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
args:
- USERNAME=${BACK_USER_NAME}
- USER_UID=${BACK_USER_ID}
- USER_GID=${APP_GROUP_ID}
ports:
- "9000:8080"
networks:
- app-network
volumes:
- ./backend:/workspace/backend:cached
command: sleep infinity
depends_on:
- mysql
environment:
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/app_db
- SPRING_DATASOURCE_USERNAME=app_user
- SPRING_DATASOURCE_PASSWORD=app_pass
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- USERNAME=${FRONT_USER_NAME}
- USER_UID=${FRONT_USER_ID}
- USER_GID=${APP_GROUP_ID}
ports:
- "4000:3000"
networks:
- app-network
working_dir: /workspace/frontend
volumes:
- ./frontend:/workspace/frontend:cached
command: sleep infinity
mysql:
image: mysql:8.0
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: app_db
MYSQL_USER: app_user
MYSQL_PASSWORD: app_pass
ports:
- "3406:3306"
volumes:
- mysql-data:/var/lib/mysql
networks:
- app-network
volumes:
mysql-data:
networks:
app-network:
driver: bridge