aiber-jwt-test/db/docker-compose.yml
Martin Donnelly e512ae52b0 Server is now receiving messages
DB server set up
2021-03-25 10:08:41 +00:00

15 lines
462 B
YAML

version: '3'
services:
database:
image: "postgres:alpine" # use latest official postgres version
ports:
- 5432:5432
# restart: always
env_file:
- database.env # configure postgres
volumes:
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
- ./setup/init.sql:/docker-entrypoint-initdb.d/init.sql
volumes:
database-data: # named volumes can be managed easier using docker-compose