-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-blue.yml
52 lines (48 loc) · 1.14 KB
/
docker-compose-blue.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
version: "3.8"
services:
backend:
container_name: backend-blue
build:
context: backend
dockerfile: dockerfile-prod
environment:
SPRING_DATASOURCE_URL: ${DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${DATASOURCE_PASSWORD}
SPRING_PROFILES_ACTIVE: prod
ports:
- "8080:8080"
depends_on:
- redis
command: ["java", "-jar", "/app.jar"]
volumes:
- ./backend:/app
- ./backend/target/classes:/app/classes
frontend:
container_name: frontend-blue
build:
context: frontend
dockerfile: dockerfile
command: [ "npm", "run", "dev" ]
volumes:
- ./frontend:/frontend
- /frontend/node_modules
- ./frontend/.npm/_cacache:/frontend/.npm/_cacache
- build_folder:/frontend/dist
ports:
- "5173:5173"
tty: true
environment:
- npm_config_cache=/frontend/.npm/_cacache
depends_on:
- backend-blue
redis:
hostname: redis
container_name: redis-blue
image: redis:latest
ports:
- 6380:6379
restart: always
volumes:
mysql_data:
build_folder: