-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
42 lines (40 loc) · 824 Bytes
/
Copy pathcompose.yaml
File metadata and controls
42 lines (40 loc) · 824 Bytes
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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: sqltojson
POSTGRES_USER: sqltojson
POSTGRES_PASSWORD: sqltojson
volumes:
- pgdata:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d:ro
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sqltojson -d sqltojson"]
interval: 5s
timeout: 5s
retries: 10
app:
build:
context: .
volumes:
- ./queries:/app/queries:ro
depends_on:
- db
environment:
DB_TYPE: pgx
DB_HOST: db
DB_PORT: "5432"
DB_NAME: sqltojson
DB_USER: sqltojson
DB_PASSWORD: sqltojson
command:
- -addr
- :8080
- -sql-dir
- /app/queries
ports:
- "8080:8080"
volumes:
pgdata: