version: '2.2' services: risotto: build: context: ../ dockerfile: docker/Dockerfile volumes: - ../.:/srv/src/risotto ports: - "8080:8080" depends_on: - postgres links: - postgres #command: tail -F /var/log command: python -u /srv/src/risotto/script/server.py restart: on-failure environment: RISOTTO_DSN: ${RISOTTO_DSN:-postgres://risotto:risotto@postgres:5432/risotto} RISOTTO_TIRAMISU_DSN: ${RISOTTO_TIRAMISU_DSN:-postgres://risotto:risotto@postgres:5432/tiramisu} postgres: image: postgres:11-alpine environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} PGDATA: /data/postgres volumes: - ./postgres-init/:/docker-entrypoint-initdb.d/ ports: - "5432:5432" restart: unless-stopped