5 Commits

Author SHA1 Message Date
eedf2f83f0 Cargo form apt
Some checks failed
release-tag / release-image (push) Has been cancelled
2024-07-01 22:06:55 +02:00
1c7b246252 New Rust
Some checks failed
release-tag / release-image (push) Failing after 3m56s
2024-07-01 21:56:06 +02:00
709fc3b1a4 fix container
Some checks failed
release-tag / release-image (push) Has been cancelled
2024-07-01 21:35:57 +02:00
0988d53231 Bump versions and remove sentry
Some checks failed
release-tag / release-image (push) Failing after 4m26s
2024-07-01 21:10:07 +02:00
Marijn Doeve
02d225f2b2 Update dependencies
All checks were successful
release-nightly / release-image (push) Successful in 21m55s
2024-04-12 11:19:52 +02:00
2 changed files with 12 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ name: release-tag
on: on:
push: push:
tags: tags:
- '*' - "*"
jobs: jobs:
release-image: release-image:
@@ -40,7 +40,7 @@ jobs:
- name: Build and push - name: Build and push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
env: env:
ACTIONS_RUNTIME_TOKEN: '' # See https://gitea.com/gitea/act_runner/issues/119 ACTIONS_RUNTIME_TOKEN: "" # See https://gitea.com/gitea/act_runner/issues/119
IMAGE_NAME: gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }} IMAGE_NAME: gitea.marijndoeve.nl/marijn/${{ steps.meta.outputs.REPO_NAME }}
with: with:
context: . context: .
@@ -62,10 +62,10 @@ jobs:
DOCKER_COMPOSE: IMAGE_TAG=${{ gitea.ref_name }} docker compose --ansi=never -f=compose.yaml -f=compose.prod.yaml DOCKER_COMPOSE: IMAGE_TAG=${{ gitea.ref_name }} docker compose --ansi=never -f=compose.yaml -f=compose.prod.yaml
uses: https://github.com/appleboy/ssh-action@master uses: https://github.com/appleboy/ssh-action@master
with: with:
host: ${{ secrets.HOST }} host: ${{ vars.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ vars.USERNAME }}
key: ${{ secrets.KEY }} key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }} port: ${{ vars.PORT }}
script: | script: |
cd /opt/projectorpi-web cd /opt/projectorpi-web
${{ env.DOCKER_COMPOSE }} pull ${{ env.DOCKER_COMPOSE }} pull

View File

@@ -1,8 +1,8 @@
FROM docker.io/python:3.11-slim AS base FROM docker.io/python:3.12-slim AS base
WORKDIR /app WORKDIR /app
FROM base as dev FROM base AS dev
RUN pip3 install poetry RUN pip3 install poetry
@@ -10,14 +10,16 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true
CMD [ "poetry", "run", "uvicorn", "--app-dir", "projectorpi_web", "app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] CMD [ "poetry", "run", "uvicorn", "--app-dir", "projectorpi_web", "app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
FROM base as prod FROM base AS prod
ADD requirements.txt ./ ADD requirements.txt ./
RUN apt-get update && apt-get install -y build-essential \ RUN apt-get update && apt-get install -y build-essential cargo \
&& pip3 install --no-cache --upgrade pip \ && pip3 install --no-cache --upgrade pip \
&& pip3 install --no-cache -r requirements.txt \ && pip3 install --no-cache -r requirements.txt \
&& apt-get remove -y build-essential && rm /usr/local/bin/cargo \
&& apt-get remove -y build-essential cargo
ADD projectorpi_web ./projectorpi_web ADD projectorpi_web ./projectorpi_web