-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.22 KB
/
Copy pathdocker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.22 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
services:
postgres:
image: postgres:16-alpine
container_name: devlist-db
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
api:
build: ./api
container_name: devlist-api
restart: always
environment:
DATABASE_URL: ${DATABASE_URL}
DIRECT_URL: ${DIRECT_URL}
JWT_SECRET: ${JWT_SECRET}
GITHUB_ID: ${GITHUB_ID}
GITHUB_SECRET: ${GITHUB_SECRET}
API_URL: ${API_URL}
FRONTEND_URL: ${FRONTEND_URL}
PORT: 3001
ports:
- "127.0.0.1:3001:3001"
depends_on:
postgres:
condition: service_healthy
web:
build:
context: ./web
args:
NEXT_PUBLIC_URL_API: ${NEXT_PUBLIC_URL_API}
container_name: devlist-web
restart: always
environment:
URL_API: ${URL_API}
JWT_SECRET: ${JWT_SECRET}
GITHUB_TOKEN: ${GITHUB_TOKEN}
ports:
- "3000:3000"
depends_on:
- api
volumes:
postgres_data: