-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.17 KB
/
docker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.17 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
services:
db:
image: postgres:17-alpine
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
api:
build: .
ports:
- "5098:5098"
environment:
DATABASE_URL: postgres://postgres:${DB_PASSWORD}@db:5432/${DB_NAME}
JWT_SECRET: ${JWT_SECRET}
API_VERSION: ${API_VERSION}
PORT: ${PORT}
RUST_LOG: ${RUST_LOG}
RESEND_API_KEY: ${RESEND_API_KEY}
RESEND_FROM: ${RESEND_FROM}
FRONTEND_URL: ${FRONTEND_URL}
depends_on:
db:
condition: service_healthy
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
- NEXT_PUBLIC_WS_URL=${NEXT_PUBLIC_WS_URL}
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
NEXT_PUBLIC_WS_URL: ${NEXT_PUBLIC_WS_URL}
depends_on:
- api
volumes:
postgres_data: