From f0cd6ccc12849241a3bdff0cc950bf58e68b81a9 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Thu, 3 Oct 2024 16:25:35 +0200 Subject: [PATCH] add: docker --- Dockerfile | 14 ++++++++++++++ docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..398684e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:alpine + +WORKDIR /app + +RUN apk update && apk upgrade +RUN apk add python3 py3-pip +RUN python3 -m pip config set global.require-virtualenv False + +COPY requirements.txt . +RUN pip install -r requirements.txt + +COPY . . + +ENTRYPOINT ["python3", "main.py"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..26aad39 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3.8' + +name: ca42 + +services: + flask: + build: . + image: ca42 + container_name: flask + restart: always + volumes: + - type: bind + source: . + target: /app + ports: + - 5000:5000