diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 6aba9fc..b3bbb18 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -58,20 +58,20 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - # - name: Extract Binary For Release - # uses: https://github.com/moosetheory/actions-docker-extract@v3.1 - # id: extract - # if: startsWith(github.ref, 'refs/tags/') - # with: - # shell_command: /bin/ash -c - # image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} - # path: /usr/share/nginx/html - # destination: dist - # - name: Create a Release - # uses: https://forgejo.merr.is/actions/forgejo-release@alpinev1 - # if: startsWith(github.ref, 'refs/tags/') - # with: - # direction: upload - # release-dir: dist - # token: ${{ secrets.ADMIN_TOKEN }} + - name: Extract Binary For Release + uses: https://github.com/moosetheory/actions-docker-extract@v3.1 + id: extract + if: startsWith(github.ref, 'refs/tags/') + with: + shell_command: /bin/ash -c + image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }} + path: /dist + destination: dist + - name: Create a Release + uses: https://forgejo.merr.is/actions/forgejo-release@alpinev1 + if: startsWith(github.ref, 'refs/tags/') + with: + direction: upload + release-dir: dist + token: ${{ secrets.ADMIN_TOKEN }} diff --git a/Dockerfile b/Dockerfile index 82032c6..7b34b52 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,10 +22,6 @@ COPY . . # [optional] tests & build ENV NODE_ENV=production -# I can't run the type checking because of some sort of issue with -# bun and vue-tsc. -# see https://github.com/oven-sh/bun/issues/4754 -# RUN bunx --bun vue-tsc --build --force RUN bunx --bun vite build # Copy the distribution folder into the final image. diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..f25be24 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,31 @@ +# This is making minimal changes from the guide at +# https://bun.sh/guides/ecosystem/docker (as of 2024-02-04) + +# use the official Bun image +# see all versions at https://hub.docker.com/r/oven/bun/tags +FROM oven/bun:1-alpine as base +WORKDIR /app + +# install dependencies into temp directory +# this will cache them and speed up future builds +FROM base as install +RUN mkdir -p /tmp/dev +COPY package.json bun.lockb /temp/dev/ +RUN cd /temp/dev && bun install --frozen-lockfile + +# install with --production (exclude devDependencies) +RUN mkdir -p /temp/prod +COPY package.json bun.lockb /temp/prod/ +RUN cd /temp/prod && bun install --frozen-lockfile --production +# ^ Is this necessary? Don't we either need prod or not prod? + +# copy node_modules from temp directory +# then copy all (non-ignored) project files into the image +FROM base AS prerelease +COPY --from=install /temp/dev/node_modules node_modules +COPY . . + +FROM nginx:stable-alpine as release + +COPY --from=build-stage /app/docker/nginx.conf /etc/nginx/nginx.conf +COPY --from=build-stage /app/dist /usr/share/nginx/html diff --git a/bun.lockb b/bun.lockb index 39c0ac4..6e01c21 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 5323011..b08cacf 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,9 @@ }, "dependencies": { "axios": "^1.6.5", - "axios-retry": "^4.0.0", - "oidc-client-ts": "^3.0.1", "pinia": "^2.1.7", + "sass": "^1.69.7", "vue": "^3.3.11", - "vue-oidc-client": "^1.0.0-alpha.5", "vue-router": "^4.2.5", "vuetify": "^3.4.10" }, @@ -43,8 +41,6 @@ "typescript": "~5.3.0", "vite": "^5.0.10", "vitest": "^1.0.4", - "vue-tsc": "^1.8.25", - "sass": "^1.69.7", - "vite-plugin-vuetify": "^2.0.1" + "vue-tsc": "^1.8.25" } } diff --git a/public/config.json b/public/config.json deleted file mode 100644 index e89a2f4..0000000 --- a/public/config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "apiBaseURL": "http://coder.local.merr.is:3001", - "oidcAuthority": "https://auth.joes.moosenet.work", - "oidcClientID": "255988227184328707@isekai:_slow_life_calculator", - "oidcProjectID": "255987963094106115" -} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 5248187..63d145c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,25 @@