From 4f8f8856b201348e090cfefa11a3e4c74e362552 Mon Sep 17 00:00:00 2001 From: Matthew Fisher Date: Wed, 25 Sep 2024 19:39:57 -0500 Subject: [PATCH] Add pre-req for dockerizing app --- .gitea/workflows/build_image.yaml | 31 +++++++++++++++++++++++++++++++ Dockerfile | 5 +++++ 2 files changed, 36 insertions(+) create mode 100644 .gitea/workflows/build_image.yaml create mode 100644 Dockerfile diff --git a/.gitea/workflows/build_image.yaml b/.gitea/workflows/build_image.yaml new file mode 100644 index 0000000..942c2ad --- /dev/null +++ b/.gitea/workflows/build_image.yaml @@ -0,0 +1,31 @@ +name: ci + +on: + push: + branches: + - 'release' + +jobs: + docker: + runs-on: ubuntu-22.04 + steps: + #- + # name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to Docker Hub + uses: SeptBlast/docker-login@v1.1.2 + with: + login-server: harbor.fisherhome.xyz + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_PASSWORD }} + + - uses: actions/checkout@v3 + - name: Build and push + run: | + docker login --username ${{ secrets.HARBOR_USERNAME }} --password ${{ secrets.HARBOR_PASSWORD }} harbor.fisherhome.xyz + docker build --no-cache ./ -t harbor.fisherhome.xyz/library/tooloftheweek-frontend:latest + docker push harbor.fisherhome.xyz/library/tooloftheweek-frontend:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4cf48ee --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM 3.12.6-alpine + +COPY . /app + +CMD [flask run]