Files
wlan-cloud-ucentral-deploy/docker-compose/docker-compose.postgresql.yml
Johann Hoffmann fab8de7a55 [WIFI-6170] Add OpenWifi Docker Compose deployment with PostgreSQL (#43)
* Add Compose override file with PostgreSQL service and related files

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Remove unnecessary tags

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Update README.md

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Wait for DB readiness

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>

* Add root and data directory variables to microservice env files

Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2021-12-16 17:26:27 +01:00

38 lines
825 B
YAML

version: '3'
volumes:
postgresql_data:
driver: local
services:
owgw:
depends_on:
- postgresql
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owgw"]
owsec:
depends_on:
- postgresql
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owsec"]
owfms:
depends_on:
- postgresql
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owfms"]
owprov:
depends_on:
- postgresql
command: ["./wait-for-postgres.sh", "postgresql", "/openwifi/owprov"]
postgresql:
image: "postgres:${POSTGRESQL_TAG}"
networks:
openwifi:
env_file:
- postgresql.env
restart: unless-stopped
volumes:
- postgresql_data:/var/lib/postgresql/data
- ./postgresql/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh