-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (80 loc) · 1.84 KB
/
docker-compose.yml
File metadata and controls
89 lines (80 loc) · 1.84 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
version: '3.9'
services:
db:
image: postgres:15
container_name: workmatch-db
environment:
POSTGRES_DB: workmatch
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
networks:
- workmatch-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d workmatch"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: workmatch-backend
environment:
SERVER_PORT: 8081
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/workmatch
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: 1234
SPRING_JPA_HIBERNATE_DDL_AUTO: update
depends_on:
- db
ports:
- "8081:8081"
volumes:
- ./backend:/app # SINCRONIZA CÓDIGO
- ~/.m2:/root/.m2 # CACHE
networks:
- workmatch-net
auth-serve:
build:
context: ./auth-serve
dockerfile: Dockerfile.dev
container_name: workmatch-auth-serve
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/workmatch
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: 1234
depends_on:
- db
ports:
- "8082:8082"
volumes:
- ./auth-serve:/app
- ~/.m2:/root/.m2
networks:
- workmatch-net
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: workmatch-frontend
ports:
- "5173:5173"
environment:
- REACT_APP_API_URL=http://backend:8081
- CHOKIDAR_USEPOLLING=true
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
networks:
- workmatch-net
volumes:
db_data:
networks:
workmatch-net:
driver: bridge