40 lines
802 B
YAML
40 lines
802 B
YAML
version: '3.0'
|
|
|
|
services:
|
|
app_server:
|
|
build: .
|
|
depends_on:
|
|
- pagerino_db
|
|
networks:
|
|
- app_net
|
|
- pagerino_net
|
|
restart: on-failure:3
|
|
|
|
pagerino_db:
|
|
image: postgres:15
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${DB_USER}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
POSTGRES_DB: ${DB_NAME}
|
|
networks:
|
|
- app_net
|
|
volumes:
|
|
- dbdata:/var/lib/postgresql/data
|
|
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
- ./postgresql.conf:/etc/postgresql/postgresql.conf
|
|
command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
|
|
# ports:
|
|
# - "5432:5432"
|
|
|
|
|
|
volumes:
|
|
dbdata:
|
|
|
|
networks:
|
|
app_net:
|
|
driver: bridge
|
|
pagerino_net:
|
|
external: true
|
|
|