Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
478482ab01 | |||
f1e3e4ecaa | |||
05eb8a092c | |||
633e374a17 | |||
cd75440a6d | |||
3354975e2e | |||
1ffe933d6e |
@@ -1,3 +1,6 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
.astro
|
||||||
|
.gitea
|
||||||
|
.vscode
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
@@ -53,32 +53,12 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
tags: |
|
tags: |
|
||||||
type=schedule
|
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
type=ref,event=pr
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
type=sha
|
|
||||||
images: |
|
images: |
|
||||||
${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
|
${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
|
||||||
${{ vars.REGISTRY_HOST }}/images/site-profile
|
${{ vars.REGISTRY_HOST }}/images/site-profile
|
||||||
|
|
||||||
- name: Build and Export to Docker
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
load: true
|
|
||||||
tags: ${{ env.TEST_TAG }}
|
|
||||||
file: ./Dockerfile
|
|
||||||
build-args: |
|
|
||||||
REGISTRY=hub.docker
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
docker run --rm ${{ env.TEST_TAG }}
|
|
||||||
|
|
||||||
- name: Build and Push Image
|
- name: Build and Push Image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
@@ -88,8 +68,6 @@ jobs:
|
|||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
build-args: |
|
|
||||||
REGISTRY=hub.docker
|
|
||||||
|
|
||||||
- name: Actions Ntfy
|
- name: Actions Ntfy
|
||||||
run: |
|
run: |
|
||||||
|
12
Dockerfile
12
Dockerfile
@@ -1,7 +1,7 @@
|
|||||||
ARG REGISTRY
|
ARG REGISTRY=hub.docker
|
||||||
FROM ${REGISTRY}/node:22.16.0-alpine3.22 AS base
|
FROM ${REGISTRY}/node:22.16.0-alpine3.22 AS base
|
||||||
|
|
||||||
LABEL version="0.8.5"
|
LABEL version="0.8.9"
|
||||||
LABEL description="Astro based personal website"
|
LABEL description="Astro based personal website"
|
||||||
|
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
@@ -13,15 +13,15 @@ WORKDIR /app
|
|||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
|
||||||
FROM base AS prod-deps
|
FROM base AS prod-deps
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --save form-data
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
|
||||||
|
|
||||||
FROM prod-deps AS build-deps
|
FROM prod-deps AS build-deps
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --save form-data
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||||
|
|
||||||
FROM build-deps AS build
|
FROM build-deps AS build
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
RUN pnpm prune --omit=dev
|
RUN pnpm prune --prod
|
||||||
|
|
||||||
FROM base AS runtime
|
FROM base AS runtime
|
||||||
COPY --from=prod-deps /app/node_modules /app/node_modules
|
COPY --from=prod-deps /app/node_modules /app/node_modules
|
||||||
@@ -33,4 +33,4 @@ ENV DIRECTUS_URL=https://directus.alexlebens.dev
|
|||||||
ENV PORT=4321
|
ENV PORT=4321
|
||||||
|
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
CMD node ./dist/server/entry.mjs
|
CMD ["node", "./dist/server/entry.mjs"]
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "site-profile",
|
"name": "site-profile",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.8.5",
|
"version": "0.8.9",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
|
Reference in New Issue
Block a user