47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
env_file:
|
|
- ./.env
|
|
# ports:
|
|
# - "5432:5432"
|
|
volumes:
|
|
- ./postgres_data:/var/lib/postgresql/data
|
|
container_name: postgres_db
|
|
restart: always
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "pg_isready", "-d", "${POSTGRES_DB}" ]
|
|
interval: 30s
|
|
timeout: 60s
|
|
retries: 5
|
|
start_period: 80s
|
|
web:
|
|
ports:
|
|
- ${WEB_PORT:-5050}:8086
|
|
build:
|
|
context: ./src
|
|
env_file:
|
|
- ./.env
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: always
|
|
|
|
pgadmin:
|
|
container_name: pgadmin_container
|
|
image: dpage/pgadmin4:6.19
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin@example.com}
|
|
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
|
|
PGADMIN_CONFIG_SERVER_MODE: 'False'
|
|
volumes:
|
|
- pgadmin:/var/lib/pgadmin
|
|
ports:
|
|
- ${PGADMIN_PORT:-5050}:80
|
|
|
|
volumes:
|
|
pgadmin:
|