Dockerfile and nginx conf to deploy
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
node_modules
|
||||||
|
.astro
|
||||||
|
dist
|
||||||
|
.git
|
||||||
|
.github
|
||||||
|
.gitignore
|
||||||
|
.editorconfig
|
||||||
|
.prettierrc.mjs
|
||||||
|
README.md
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
@@ -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
|
|
||||||
+17
@@ -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;"]
|
||||||
+27
@@ -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;
|
||||||
|
}
|
||||||
@@ -3,14 +3,14 @@ import { Image } from 'astro:assets';
|
|||||||
|
|
||||||
import profileImg from '@/assets/profile-picture.jpg';
|
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';
|
const workLink = 'https://walcu.com';
|
||||||
---
|
---
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<Image src={profileImg} alt="Profile picture" width={30} height={30} />
|
<Image src={profileImg} alt="Profile picture" width={30} height={30} />
|
||||||
<span>Jared<<a href={githubLink} target="_blank">@jrdx0</a>></span>
|
<span>Jared<<a href={giteaLink} target="_blank">@jrdx0</a>></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<div class="dot"></div>
|
<div class="dot"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user