57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
version: '3.0'
|
|
|
|
services:
|
|
app_server:
|
|
build: .
|
|
depends_on:
|
|
- pagerino_db
|
|
networks:
|
|
- app_net
|
|
- pagerino_net
|
|
restart: on-failure:3
|
|
environment:
|
|
CHIRP_ADDRESS: ${CHIRP_ADDRESS}
|
|
SERVER_API_PORT: ${SERVER_API_PORT}
|
|
APP_ID: ${APP_ID}
|
|
|
|
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"
|
|
|
|
migrate:
|
|
image: migrate/migrate
|
|
networks:
|
|
- app_net
|
|
volumes:
|
|
- ./migrations:/migrations
|
|
command: [
|
|
"-path", "/migrations",
|
|
"-database", "postgres://${DB_USER}:${DB_PASSWORD}@${DB_NAME}:5432/pagerino_db?sslmode=disable",
|
|
"up"
|
|
]
|
|
depends_on:
|
|
- pagerino_db
|
|
|
|
volumes:
|
|
dbdata:
|
|
|
|
networks:
|
|
app_net:
|
|
driver: bridge
|
|
pagerino_net:
|
|
external: true
|
|
|