a64b6ee8a1
To enable easy infrastructure configuration a docker compose file was added with a basic redis and postgresql config
28 lines
700 B
YAML
28 lines
700 B
YAML
version: "3"
|
|
services:
|
|
|
|
server:
|
|
build:
|
|
.
|
|
depends_on:
|
|
- database
|
|
- redis
|
|
|
|
database:
|
|
image: "postgres" # use latest official postgres version
|
|
env_file:
|
|
- .env # configure postgres
|
|
volumes:
|
|
- speckle-postgres-data:/var/lib/postgresql/data/ # persist data even if container shuts down
|
|
# - ./init.sql:/docker-entrypoint-initdb.d/init.sql # this is the way to add db init script
|
|
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
|