commit 829cdeeb2e3f01cb5a4263ea27959a823c71e5b6
parent 5807f3e00890cfa34851110163c22b9e0f28601c
Author: Asher Morgan <59518073+ashermorgan@users.noreply.github.com>
Date: Fri, 12 Jul 2024 18:26:07 -0700
Dockerize
Diffstat:
5 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
@@ -22,6 +22,9 @@ jobs:
- name: Install dependencies
run: pip install -r requirements.txt
+ - name: Install test dependencies
+ run: pip install -r requirements-dev.txt
+
- name: Install playwright browsers
run: playwright install
diff --git a/Dockerfile b/Dockerfile
@@ -0,0 +1,10 @@
+FROM python:3-alpine
+
+WORKDIR /app
+
+COPY requirements.txt .
+RUN python3 -m pip install --no-cache-dir -r requirements.txt
+
+COPY songs2slides songs2slides
+
+CMD ["gunicorn", "-b", "0.0.0.0:5000", "songs2slides:create_app()"]
diff --git a/compose.yml b/compose.yml
@@ -0,0 +1,12 @@
+name: songs2slides
+
+services:
+ bot:
+ build:
+ context: .
+ environment:
+ - API_URL
+ - API_AUTH
+ stop_signal: SIGINT
+ ports:
+ - '5000:5000'
diff --git a/requirements-dev.txt b/requirements-dev.txt
@@ -0,0 +1,4 @@
+pytest
+pytest-mock
+pytest-playwright
+pytest-xprocess
diff --git a/requirements.txt b/requirements.txt
@@ -1,8 +1,5 @@
flask
+gunicorn
python-dotenv
python-pptx
requests
-pytest
-pytest-mock
-pytest-playwright
-pytest-xprocess