-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
70 lines (66 loc) · 1.69 KB
/
docker-compose.yaml
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.8'
volumes:
postgres_data:
driver: local
services:
postgres:
container_name: froom-postgres
build:
context: ./froom-backend
dockerfile: DockerFile
image: 'postgres:latest'
environment:
- POSTGRES_DB=${POSTGRES_DATABASE}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
ports:
- '${POSTGRES_LOCAL_PORT}:${POSTGRES_DOCKER_PORT}'
volumes:
- ./froom-backend/src/main/resources/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 3
backend:
container_name: froom-backend
build:
context: ./froom-backend
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:${POSTGRES_DOCKER_PORT}/${POSTGRES_DATABASE}
- SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
- SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD}
depends_on:
- postgres
env_file:
- .env
data-analysis:
container_name: froom-data-analysis
build:
context: ./data-analysis
dockerfile: DockerFile
ports:
- "5000:5000"
environment:
- FLASK_APP=${FLASK_APP}
- FLASK_RUN_HOST=${FLASK_RUN_HOST}
- FLASK_RUN_PORT=${FLASK_RUN_PORT}
env_file:
- ./data-analysis/.env
frontend:
container_name: froom-frontend
build:
context: ./froom-frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
env_file:
- ./froom-frontend/.env
volumes:
- ./froom-frontend:/app
- /app/node_modules