risotto/docker/docker-compose.yaml

32 lines
875 B
YAML
Raw Normal View History

2020-01-20 11:34:16 +01:00
version: '2.2'
services:
risotto:
build:
context: ../
dockerfile: docker/Dockerfile
volumes:
2020-01-20 15:58:04 +01:00
- ../.:/srv/src/risotto
2020-01-20 11:34:16 +01:00
ports:
- "8080:8080"
2020-01-20 15:58:04 +01:00
depends_on:
- postgres
links:
- postgres
#command: tail -F /var/log
2020-01-23 11:01:38 +01:00
command: python -u /srv/src/risotto/script/server.py
restart: on-failure
2020-01-30 16:22:06 +01:00
environment:
RISOTTO_DSN: ${RISOTTO_DSN:-postgres://risotto:risotto@postgres:5432/risotto}
RISOTTO_TIRAMISU_DSN: ${RISOTTO_TIRAMISU_DSN:-postgres://risotto:risotto@postgres:5432/tiramisu}
2020-01-20 11:34:16 +01:00
postgres:
image: postgres:11-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
2020-01-20 15:58:04 +01:00
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
2020-01-20 11:34:16 +01:00
PGDATA: /data/postgres
volumes:
2020-01-20 15:58:04 +01:00
- ./postgres-init/:/docker-entrypoint-initdb.d/
2020-01-20 11:34:16 +01:00
ports:
- "5432:5432"
2020-01-30 16:22:06 +01:00
restart: unless-stopped