Trying to fix pipeline
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Administrator 2023-03-13 15:25:15 +01:00
parent c0005f38d5
commit 78b51a7257
4 changed files with 20 additions and 20 deletions

View File

@ -3,9 +3,9 @@ pipeline:
image: golang image: golang
commands: commands:
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags - echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
when: #when:
path: [ "frontend/**", "backend/**" ] # path: [ "frontend/**", "backend/**" ]
event: push # event: push
# -------------------------------------- Backend -------------------------------------- # -------------------------------------- Backend --------------------------------------
@ -20,11 +20,11 @@ pipeline:
from_secret: registry_password from_secret: registry_password
registry: registry:
from_secret: registry from_secret: registry
dockerfile: backend/Dockerfile dockerfile: Dockerfile.Backend
platforms: linux/amd64 platforms: linux/amd64
when: #when:
path: "backend/**" # path: "backend/**"
event: push # event: push
# -------------------------------------- Frontend -------------------------------------- # -------------------------------------- Frontend --------------------------------------
@ -39,10 +39,10 @@ pipeline:
from_secret: registry_password from_secret: registry_password
registry: registry:
from_secret: registry from_secret: registry
dockerfile: frontend/Dockerfile dockerfile: Dockerfile.Frontend
platforms: linux/amd64 platforms: linux/amd64
when: #when:
path: "frontend/**" # path: "frontend/**"
event: push # event: push
branches: main branches: main

View File

@ -1,13 +1,13 @@
FROM python:3.8 FROM python:3.8
WORKDIR /app WORKDIR /app
ADD requirements.txt /app/requirements.txt ADD ./backend/requirements.txt /app/requirements.txt
RUN pip install --upgrade -r requirements.txt RUN pip install --upgrade -r requirements.txt
EXPOSE 8080 EXPOSE 8080
COPY ./ /app COPY ./backend/ /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"] CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]

7
Dockerfile.Frontend Normal file
View File

@ -0,0 +1,7 @@
FROM nginx:latest
COPY ./frontend/index.html /usr/share/nginx/html/index.html
COPY ./frontend/index.css /usr/share/nginx/html/index.css
COPY ./frontend/index.js /usr/share/nginx/html/index.js
HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://localhost/ || exit 1

View File

@ -1,7 +0,0 @@
FROM nginx:latest
COPY ./index.html /usr/share/nginx/html/index.html
COPY ./index.css /usr/share/nginx/html/index.css
COPY ./index.js /usr/share/nginx/html/index.js
HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://localhost/ || exit 1