From 4e5b6c565affadbc5e543df13a3954bf49a7ec3a Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Wed, 9 Oct 2019 23:53:35 +0300 Subject: [PATCH] Update to python 3.7 and add deploy policies --- .gitlab-ci.yml | 4 ++-- .python-version | 2 +- Dockerfile | 2 +- stack-compose.yml | 13 +++++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58d85e1..98c70b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ stages: - deploy test: - image: python:3.5 + image: python:3.7 stage: test services: - postgres:latest @@ -24,7 +24,7 @@ test: - python manage.py test pycodestyle: - image: python:3.5 + image: python:3.7 stage: lint script: - pip install pycodestyle diff --git a/.python-version b/.python-version index 424e179..0833a98 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.6.8 +3.7.4 diff --git a/Dockerfile b/Dockerfile index 7533761..3123a63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.5 +FROM python:3.7 ENV PYTHONUNBUFFERED 1 ENV IS_DOCKER 1 RUN mkdir /code diff --git a/stack-compose.yml b/stack-compose.yml index 2b3101a..ed901fb 100644 --- a/stack-compose.yml +++ b/stack-compose.yml @@ -2,6 +2,13 @@ version: '3.4' services: db: image: postgres:10 + deploy: + replicas: 1 + restart_policy: + condition: on-failure + update_config: + order: start-first + environment: - POSTGRES_USER_FILE=/run/secrets/DJANGO_DB_USER - POSTGRES_PASSWORD_FILE=/run/secrets/DJANGO_DB_PASSWD @@ -15,6 +22,12 @@ services: backend: image: registry.gitlab.com/sahkoinsinoorikilta/vtmk/web2.0-backend:latest + deploy: + replicas: 1 + restart_policy: + condition: on-failure + update_config: + order: start-first depends_on: - db ports: