Add docker workflow
This commit is contained in:
27
.gitea/workflows/docker.yaml
Normal file
27
.gitea/workflows/docker.yaml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Build Formula10 Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
paths:
|
||||||
|
- ".gitea/workflows/*"
|
||||||
|
- "Dockerfile"
|
||||||
|
- "*.py"
|
||||||
|
- "requirements.txt"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Login to container registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.vps.chriphost.de
|
||||||
|
username: ${{ secrets.CONTAINER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||||
|
- name: Build Docker image
|
||||||
|
run: docker build . --file Dockerfile --tag gitea.vps.chriphost.de/christoph/formula10:latest
|
||||||
|
- name: Push Docker image
|
||||||
|
run: docker push gitea.vps.chriphost.de/christoph/formula10:latest
|
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM python:3.10.1-slim-buster
|
||||||
|
RUN apt-get update -y
|
||||||
|
WORKDIR /app
|
||||||
|
COPY requirements.txt requirements.txt
|
||||||
|
RUN pip3 install -r requirements.txt
|
||||||
|
COPY . .
|
||||||
|
CMD ["python3", "-u", "formula10.py"]
|
6
requirements.txt
Normal file
6
requirements.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
rich
|
||||||
|
numpy
|
||||||
|
|
||||||
|
flask
|
||||||
|
flask-sqlalchemy
|
||||||
|
sqlalchemy
|
Reference in New Issue
Block a user