Adding common Postgres stack.

This commit is contained in:
Alexey Skobkin 2019-10-27 23:43:09 +03:00
parent aa7ad2ed64
commit 5816baea13
No known key found for this signature in database
GPG Key ID: 5D5CEF6F221278E7
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,2 @@
POSTGRES_PASSWORD=password
COMMON_DATABASE_NETWORK=database-net

View File

@ -0,0 +1,23 @@
version: '3.7'
services:
postgres-common:
image: postgres:12-alpine
container_name: postgres-common
env_file: .env
networks:
- db-network
ports:
- "127.0.0.1:5432:5432/tcp"
volumes:
# Database files
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
postgres-data:
networks:
db-network:
name: "${COMMON_DATABASE_NETWORK:-database-network}"
external: true