-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
49 lines (48 loc) · 1.22 KB
/
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
version: "3.3"
services:
next:
container_name: queue
image: ${IMAGE_NAME}
# volumes:
# - ./public/videos:/app/public/videos
build: .
depends_on:
- db
environment:
- DATABASE_URL=${DATABASE_URL}
- TZ=Asia/Jakarta
# if you are using reverse proxy you don't noeed to expose the port
ports:
- "3004:3000"
db:
image: postgres:15
container_name: ${CONTAINER_NAME}
restart: always
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_USER=${DB_USER}
- POSTGRES_DB=${DB_NAME}
- TZ=Asia/Jakarta
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 1s
timeout: 3s
retries: 30
volumes:
- postgres_data:/var/lib/postgresql/data
# you dont need to expose the port, use it if you want to connect to databse from your local machine while developing
ports:
- "5433:5432"
prisma-studio:
image: ${IMAGE_NAME}
container_name: prisma-studio
command: ["npx", "prisma", "studio"]
environment:
- DATABASE_URL=${DATABASE_URL}
- TZ=Asia/Jakarta
depends_on:
- db
ports:
- "5555:5555"
volumes:
postgres_data: