Files
speckle-server/docker-compose.yaml
T
Gergő Jedlicska 500331d6a3 feat(docker-compose and database): automated database initialization scripts
To bootstrap a local database container for Speckle Server an init script is added and it is mounted
to the container. Knexfile also had to be modified for in code connection string buildup.

#73
2021-01-14 18:27:53 +01:00

32 lines
860 B
YAML

version: "3"
services:
# this could be enabled once the server container is added
# server:
# build:
# .
# depends_on:
# - database
# - redis
database:
image: "postgres" # use latest official postgres version
env_file:
- .env # configure postgres
volumes:
# persist data even if container shuts down
- speckle-postgres-data:/var/lib/postgresql/data/
# this mounts the initdb folder to the db container
# .sql .sh files are executed from this folder in alphabetical order
- ./initdb:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
redis:
image: "redis"
ports:
- "6379:6379" # It is not neccesary to expose the reddis port if running the app with compose
volumes:
speckle-postgres-data: # named volumes can be managed easier using docker-compose