diff --git a/.dockerignore b/.dockerignore index ae61f74..31bb6fd 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,3 @@ Dockerfile docker-compose.yml LICENSE *.md -yotter-config.json diff --git a/Dockerfile b/Dockerfile index a09eafd..5f8971d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM python:alpine +FROM python:3-alpine WORKDIR /usr/src/app -RUN apk add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ - COPY requirements.txt ./ -RUN pip install wheel cryptography gunicorn pymysql -RUN pip install --no-cache-dir -r requirements.txt +RUN apk --no-cache add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ \ + && pip install --no-cache-dir wheel cryptography gunicorn pymysql \ + && pip install --no-cache-dir -r requirements.txt \ + && apk del gcc musl-dev libffi-dev openssl-dev file llvm-dev make g++ COPY . . diff --git a/docker-compose.yml b/docker-compose.yml index 44c391f..df7bac1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,13 @@ -version: '3.4' +version: '3.8' services: mariadb: - image: mariadb:latest + image: mariadb:10.5 environment: MYSQL_ROOT_PASSWORD: changeme MYSQL_DATABASE: yotter MYSQL_USER: yotter MYSQL_PASSWORD: changeme - restart: on-failure + restart: unless-stopped volumes: - /var/lib/mysql healthcheck: