-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
40 lines (37 loc) · 1.02 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
# this compose file is setup for dev/testing purposes
# you should figure something else out for actual deployments
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: fortunes
POSTGRES_USER: fortunes
POSTGRES_PASSWORD: fortunes
PG_USER: fortunes
ports:
- 127.0.0.1::5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fortunes"]
interval: 5s
timeout: 5s
retries: 5
postgres-migrations:
image: amacneil/dbmate
command: --wait --no-dump-schema -u postgres://fortunes:fortunes@postgres:5432/fortunes?sslmode=disable up
volumes:
- ./db:/db:ro
depends_on:
postgres:
condition: service_healthy
# pgbouncer:
# image: bitnami/pgbouncer
# links:
# - postgres:postgres
# ports:
# - 127.0.0.1::6432
# environment:
# PGBOUNCER_DATABASE: fortunes
# POSTGRESQL_USERNAME: fortunes
# POSTGRESQL_PASSWORD: fortunes
# POSTGRESQL_HOST: postgres
# POSTGRESQL_PORT: 5432