diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-20 18:12:57 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-20 18:12:57 +0100 |
commit | 966f40d591d6fc95068fc22c5b283b9ab54c3d8e (patch) | |
tree | 91d949d700e58bf89917f5e0cbb34ea97e54bea2 /docker-compose.yml | |
parent | added files for docker (diff) | |
download | newspipe-966f40d591d6fc95068fc22c5b283b9ab54c3d8e.tar.gz newspipe-966f40d591d6fc95068fc22c5b283b9ab54c3d8e.tar.bz2 newspipe-966f40d591d6fc95068fc22c5b283b9ab54c3d8e.zip |
Added Dockerfile, images: python3.8-alpine and postgres.
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 34 |
1 files changed, 25 insertions, 9 deletions
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" |