42 lines
851 B
YAML
42 lines
851 B
YAML
version: '3.9'
|
|
|
|
services:
|
|
db:
|
|
image: postgres:17
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: no_copy_db
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_HOST: postgres
|
|
PGDATA: /data/postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready -U postgres -p 5432" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 20
|
|
container_name: postgres
|
|
|
|
app:
|
|
build: .
|
|
container_name: no_copy_app
|
|
environment:
|
|
POSTGRES_DB: no_copy_db
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_HOST: postgres
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
volumes:
|
|
pgdata:
|