Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (63 loc) · 1.5 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (63 loc) · 1.5 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
services:
# PostgreSQL Database
db:
container_name: reasonly-db
image: postgres:latest
environment:
POSTGRES_USER: ryanqu27
POSTGRES_PASSWORD: password
POSTGRES_DB: reasonly
PGDATA: /data/postgres
volumes:
- db:/data/postgres
ports:
- "5332:5432"
networks:
- reasonly-network
restart: unless-stopped
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ryanqu27 -d reasonly" ]
interval: 5s
timeout: 5s
retries: 5
# Spring Boot Backend
backend:
container_name: reasonly-backend
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8080:8080"
networks:
- reasonly-network
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/reasonly
SPRING_DATASOURCE_USERNAME: ryanqu27
SPRING_DATASOURCE_PASSWORD: password
JWT_SECRET: ${JWT_SECRET}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
db:
condition: service_healthy
restart: unless-stopped
# React Frontend
frontend:
container_name: reasonly-frontend
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
networks:
- reasonly-network
environment:
VITE_API_URL: http://localhost:8080
depends_on:
- backend
restart: unless-stopped
networks:
reasonly-network:
driver: bridge
volumes:
db: