From fb9e0c19668f76ba119ebc493b7b106afee1a02f Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Tue, 19 Sep 2023 15:51:35 +0100 Subject: [PATCH 1/2] docker stuff --- .forgejo/workflows/build.yaml | 18 ++++++++++++++++++ Dockerfile | 25 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .forgejo/workflows/build.yaml create mode 100644 Dockerfile diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..c54703d --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,18 @@ +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-22.04 + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Registry + uses: docker/login-action@v2 + with: + registry: git.olympuslab.net + username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + - name: Build + uses: docker/build-push-action@master + with: + context: . + tags: git.olympuslab.net/alice/notes:latest + load: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec1d8e6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM oven/bun + +RUN apt-get update && \ + apt-get install -y git + +WORKDIR /app/ + +RUN git clone https://github.com/TuanManhCao/digital-garden + +ARG NODE_ENV=development + +WORKDIR /app/digital-garden + +RUN rm -rf posts/* + +COPY Notes/ posts/. + +COPY README.md posts/index.md + +RUN bun install package.json + +CMD ["bun","run","dev"] + + + From c27523a5d9711fbac0011aed33aa02c0b20744a9 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Tue, 19 Sep 2023 15:56:05 +0100 Subject: [PATCH 2/2] docker stuff --- .forgejo/workflows/build.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index c54703d..b1788d2 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -1,6 +1,9 @@ +name: Build dockerfile +on: [push] + jobs: - Explore-Gitea-Actions: - runs-on: ubuntu-22.04 + Build-dockerfile: + runs-on: ubuntu-latest steps: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2