19 lines
427 B
YAML
19 lines
427 B
YAML
services:
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: my_postgres
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${POSTGRES_PORT}:5432"
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
|
|
volumes:
|
|
postgres_data:
|
|
|