diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..43e0c04 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +node_modules +.astro +dist +.git +.github +.gitignore +.editorconfig +.prettierrc.mjs +README.md +Dockerfile +.dockerignore diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index f4b74a1..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Deploy to GitHub Pages - -on: - # Trigger the workflow every time you push to the `main` branch - # Using a different branch name? Replace `main` with your branch’s name - push: - branches: [ main ] - # Allows you to run this workflow manually from the Actions tab on GitHub. - workflow_dispatch: - -# Allow this job to clone the repo and create a page deployment -permissions: - contents: read - pages: write - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout your repository using git - uses: actions/checkout@v6 - - name: Install, build, and upload your site - uses: withastro/action@v6 - # with: - # path: . # The root location of your Astro project inside the repository. (optional) - # node-version: 24 # The specific version of Node that should be used to build your site. Defaults to 22. (optional) - # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) - # build-cmd: pnpm run build # The command to run to build your site. Runs the package build script/task by default. (optional) - # env: - # PUBLIC_POKEAPI: 'https://pokeapi.co/api/v2' # Use single quotation marks for the variable value. (optional) - - deploy: - needs: build - runs-on: ubuntu-latest - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v5 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0527707 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1.7 + +FROM oven/bun:1-alpine AS builder +WORKDIR /app + +COPY package.json bun.lock ./ +RUN bun install --frozen-lockfile + +COPY . . +RUN bun run build + +FROM nginx:stable-alpine AS runner +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=builder /app/dist /usr/share/nginx/html + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..5495bc3 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,27 @@ +server { + listen 80; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + absolute_redirect off; + port_in_redirect off; + + location / { + try_files $uri $uri/ $uri.html =404; + } + + location ~* \.(?:css|js|woff2?|ttf|otf|eot|svg|png|jpg|jpeg|gif|webp|avif|ico)$ { + expires 30d; + access_log off; + add_header Cache-Control "public, max-age=2592000, immutable"; + } + + error_page 404 /404.html; + + gzip on; + gzip_vary on; + gzip_min_length 1024; + gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml; +} diff --git a/src/components/Header.astro b/src/components/Header.astro index e4e01d8..8d4ab8c 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,14 +3,14 @@ import { Image } from 'astro:assets'; import profileImg from '@/assets/profile-picture.jpg'; -const githubLink = 'https://github.com/jrdx0'; +const giteaLink = 'https://gitea.undefined.mx/jrdx0'; const workLink = 'https://walcu.com'; ---
Profile picture - Jared<@jrdx0> + Jared<@jrdx0>