-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 1.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (33 loc) · 1.02 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
# Docker Compose for Myros local development.
# Spins up a Postgres 16 instance pre-configured for the defaults in .env.example.
#
# Usage:
# docker compose up -d # start in background
# docker compose logs -f # tail logs
# docker compose down # stop containers (data is preserved in the volume)
# docker compose down -v # stop AND wipe the database
#
# Once running, Postgres is available at localhost:5432
# with user=postgres / password=local / database=postgres
# (these defaults match .env.example so `npm start` works out of the box).
services:
postgres:
image: postgres:16-alpine
container_name: myros-pg
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: local
POSTGRES_DB: postgres
ports:
- '5432:5432'
volumes:
- myros-pg-data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
volumes:
myros-pg-data:
name: myros-pg-data