Change dockerfile and actions
release-tag / release-image (push) Failing after 26s

This commit is contained in:
2024-05-08 23:40:54 +02:00
parent ade051890e
commit bb7847f5e0
2 changed files with 14 additions and 24 deletions
+6 -18
View File
@@ -1,7 +1,6 @@
name: release-tag
on:
push
on: push
jobs:
release-image:
@@ -10,41 +9,30 @@ jobs:
env:
DOCKER_ORG: legonzaur
DOCKER_LATEST: nightly
# RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker BuildX
# uses: docker/setup-buildx-action@v2
# with: # replace it with your local IP
# config-inline: |
# [registry."192.168.3.201:3000"]
# http = true
# insecure = true
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: git.legonzaur.fr
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
file: ./Dockerfile
push: true
tags: | # replace it with your local IP and tags
git.legonzaur.fr/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
git.legonzaur.fr/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
git.legonzaur.fr/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
+8 -6
View File
@@ -1,13 +1,15 @@
FROM python:alpine3.19
WORKDIR /usr/app
FROM FROM python:alpine3.19 as build-stage
WORKDIR /app
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY requirements.txt .
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY src .
# étape de production
COPY src .
EXPOSE 8765
CMD ["python3", "-u", "main.py"]