From 966f40d591d6fc95068fc22c5b283b9ab54c3d8e Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 20 Mar 2020 18:12:57 +0100 Subject: Added Dockerfile, images: python3.8-alpine and postgres. --- docker-compose.yml | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index eee5ef32..1c176d01 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,18 +1,34 @@ version: '3' services: + db: + image: postgres:latest + hostname: db + restart: always + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=password + - POSTGRES_DB=postgres + ports: + - '5432:5432' + expose: + - '5432' + volumes: + - ./docker/postgres/data:/var/lib/postgresql/data + newspipe: - build: . + build: + context: . + dockerfile: ./Dockerfile tty: true environment: - - Newspipe_CONFIG=/newspipe/instance/sqlite.py - command: - - /bin/sh - - -c - - | - poetry run pybabel compile -d newspipe/translations - poetry run ./runserver.py + - Newspipe_CONFIG=/newspipe/instance/production.py volumes: - - .:/newspipe + - .:/newspipe:rw ports: - "5000:5000" + expose: + - '5000' + depends_on: + - db + command: "./wait-for-postgres.sh db" -- cgit