From 186b797bb6e374217304afccc843d7763335b25a Mon Sep 17 00:00:00 2001 From: Firq Date: Sat, 20 Jul 2024 17:02:30 +0200 Subject: [PATCH] Removed Dockge again, switched to alpine images --- .forgejo/workflows/build_preview.yml | 70 ++++++++++------------------ Dockerfile | 8 ++-- package.json | 2 +- 3 files changed, 29 insertions(+), 51 deletions(-) diff --git a/.forgejo/workflows/build_preview.yml b/.forgejo/workflows/build_preview.yml index d789e60..86e7eec 100644 --- a/.forgejo/workflows/build_preview.yml +++ b/.forgejo/workflows/build_preview.yml @@ -65,50 +65,30 @@ jobs: tag: ${{ github.ref_name }} prerelease: true - auto-deploy-dockge: - needs: [ build-site ] - runs-on: docker - if: success() - container: nikolaik/python-nodejs:python3.11-nodejs21 - steps: - - name: Configure pip - run: | - pip config set global.index-url https://pypi.org/simple - pip config set global.extra-index-url https://forgejo.neshweb.net/api/packages/Firq/pypi/simple/ - pip config set global.timeout 60 - pip config set global.trusted-host "pypi.org forgejo.neshweb.net" - - name: Install Dockge CLI - run: pip install dockge-cli - - name: Configure Dockge CLI - run: | - dockge host https://dockge.firq.dev - dockge login --user ${{ secrets.DOCKGE_USER }} --password ${{ secrets.DOCKGE_CREDENTIAL }} - - name: Check status and redeploy - run: | - dockge status firq-dev-preview - dockge update firq-dev-preview - dockge status firq-dev-preview - - name: Reset CLI - run : | - dockge logout - dockge exit - - # doesn't work atm - # unlighthouse: - # needs: [publish] - # if: success() + # auto-deploy-dockge: + # needs: [ build-site ] # runs-on: docker - # container: registry.gitlab.com/gitlab-ci-utils/lighthouse:latest - # services: - # website: - # image: forgejo.neshweb.net/firq/firq-dev-website:preview + # if: success() + # container: nikolaik/python-nodejs:python3.11-nodejs21 # steps: - # - name: Install Dependencies - # run: npm install @unlighthouse/cli puppeteer - # - name: Run unlighthouse - # run: node_modules/.bin/unlighthouse-ci - # - name: Upload reports - # uses: actions/upload-artifact@v3 - # with: - # name: unlighthouse-reports - # path: unlighthouse-reports/ + # - name: Configure pip + # run: | + # pip config set global.index-url https://pypi.org/simple + # pip config set global.extra-index-url https://forgejo.neshweb.net/api/packages/Firq/pypi/simple/ + # pip config set global.timeout 60 + # pip config set global.trusted-host "pypi.org forgejo.neshweb.net" + # - name: Install Dockge CLI + # run: pip install dockge-cli + # - name: Configure Dockge CLI + # run: | + # dockge host https://dockge.firq.dev + # dockge login --user ${{ secrets.DOCKGE_USER }} --password ${{ secrets.DOCKGE_CREDENTIAL }} + # - name: Check status and redeploy + # run: | + # dockge status firq-dev-preview + # dockge update firq-dev-preview + # dockge status firq-dev-preview + # - name: Reset CLI + # run : | + # dockge logout + # dockge exit diff --git a/Dockerfile b/Dockerfile index 17ae671..8dfb4a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,15 @@ -FROM node:lts AS build +FROM node:22-alpine AS build WORKDIR /app COPY . . RUN npm i RUN npm run astro telemetry disable RUN npm run build -FROM forgejo.neshweb.net/ci-docker-images/website-serve:0.1.3 AS runtime +FROM forgejo.neshweb.net/ci-docker-images/website-serve:2 AS runtime COPY --from=build /app/dist /public COPY --from=build /app/serve.json /public/serve.json RUN rm -r /public/data/ -ENV PORT=8081 EXPOSE 8081 - -CMD serve public/ -p ${PORT} +CMD serve public/ -p 8081 diff --git a/package.json b/package.json index 27803d9..56b28b7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@firq/fgosite", "type": "module", - "version": "0.2.0-pre.4", + "version": "0.2.0-pre.5", "private": true, "scripts": { "dev": "astro dev",