-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcompose.yaml
33 lines (31 loc) · 911 Bytes
/
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
services:
web:
build: .
ports:
- '5173:5173'
tty: true
volumes:
- .:/usr/src/app:cached
- ./node_modules:/usr/src/app/node_modules:cached
environment:
- NODE_ENV=development
- DATABASE_URL=postgresql://db_user:db_password@db:5432/test_db?pgbouncer=true&connection_limit=10&connect_timeout=60&statement_timeout=60000 # Note: Local server cannot start if port is set to db:6543.
- DIRECT_URL=postgresql://db_user:db_password@db:5432/test_db
command: sleep infinity
depends_on:
- db
db:
image: postgres:15.1
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data:cached
environment:
POSTGRES_USER: db_user
POSTGRES_PASSWORD: db_password
POSTGRES_DB: test_db
POSTGRES_INITDB_ARGS: '--encoding=UTF8'
ports:
- '6543:5432'
volumes:
postgres-data:
driver: local