forked from nhcarrigan-spring-2026-cohort/teal-iris
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (59 loc) · 1.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
62 lines (59 loc) · 1.62 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
services:
db:
image: postgres:16-alpine
container_name: teal-iris-db
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: teal_iris
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d teal_iris"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: apps/backend/Dockerfile
container_name: teal-iris-backend
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
environment:
- DATABASE_URL=postgres://user:password@db:5432/teal_iris
- PORT=3000
- GOOGLE_CLIENT_ID= ${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET= ${GOOGLE_CLIENT_SECRET}
- GOOGLE_CALLBACK_URL= ${GOOGLE_CALLBACK_URL}
volumes:
# Hot reload: sync source code
- ./apps/backend/src:/app/apps/backend/src
# Preserve node_modules in container
- /app/node_modules
- /app/apps/backend/node_modules
command: pnpm --filter backend start:dev
frontend:
build:
context: .
dockerfile: apps/frontend/Dockerfile
container_name: teal-iris-frontend
ports:
- "3001:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:3000
volumes:
# Hot reload: sync source code
- ./apps/frontend:/app/apps/frontend
# Preserve node_modules and .next in container
- /app/node_modules
- /app/apps/frontend/node_modules
- /app/apps/frontend/.next
command: pnpm --filter frontend dev
volumes:
postgres_data: