-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.postgres.yml
More file actions
35 lines (33 loc) · 1.09 KB
/
Copy pathdocker-compose.postgres.yml
File metadata and controls
35 lines (33 loc) · 1.09 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
# Opt-in override that swaps the default MariaDB `database` service for PostgreSQL.
# Usage: docker compose -f docker-compose.yml -f docker-compose.postgres.yml up
#
# `!override` (Compose 2.24+) replaces the base service's environment/volumes
# wholesale, so the container does not carry stray MYSQL_* env vars or attempt
# to mount the mariadb-data volume. `!reset []` empties the ports list.
services:
database:
image: postgres:16
ports: !reset []
environment: !override
POSTGRES_DB: db
POSTGRES_USER: db
POSTGRES_PASSWORD: db
healthcheck:
test: ["CMD-SHELL", "pg_isready -U db -d db"]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
volumes: !override
- postgres-data:/var/lib/postgresql/data
phpfpm:
image: entity-bundle/php-postgres:local
build:
context: .
dockerfile: docker/php-postgres/Dockerfile
args:
PHP_FPM_IMAGE: ${PHP_FPM_IMAGE:-itkdev/php8.4-fpm:latest}
environment:
- DATABASE_URL=postgresql://db:db@database:5432/db?serverVersion=16&charset=utf8
volumes:
postgres-data: