-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.override.yml
More file actions
41 lines (38 loc) · 1.11 KB
/
Copy pathdocker-compose.override.yml
File metadata and controls
41 lines (38 loc) · 1.11 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
# Dev-only extras, auto-merged by `docker compose up`. This adds a local Postgres container and
# points the API/indexer at it. For a managed/external database (Supabase), DON'T use this file:
#
# docker compose -f docker-compose.yml up --build
#
# and provide DATABASE_URL yourself.
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: prova
POSTGRES_PASSWORD: prova
POSTGRES_DB: prova
# Host port is overridable to avoid clashing with other local Postgres instances.
ports:
- '${POSTGRES_PORT:-5432}:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U prova']
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
api:
environment:
DATABASE_URL: postgres://prova:prova@postgres:5432/prova?sslmode=disable
depends_on:
postgres:
condition: service_healthy
indexer:
environment:
DATABASE_URL: postgres://prova:prova@postgres:5432/prova?sslmode=disable
depends_on:
postgres:
condition: service_healthy
volumes:
pgdata: