Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from doras-to/staging
Browse files Browse the repository at this point in the history
Updated Fonts & Caprover deploy
  • Loading branch information
tommerty committed Nov 22, 2023
2 parents f8fbe51 + 0430f21 commit 0793323
Show file tree
Hide file tree
Showing 9 changed files with 571 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
dist
15 changes: 15 additions & 0 deletions .github/workflows/deploy-to-caprover.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Push to CapRover

on:
push:
branches:
- main

jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: My Step
uses: jasongitmail/fast-webhook@v1.2.0
with:
url: ${{ secrets.CAPROVER_WEBHOOK_URL_DORAS_HOMESITE }}
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Use Node.js version 20.9.0 as the base image
FROM node:20.9.0

# Set the working directory within the container
# WORKDIR /app
WORKDIR /usr/src/app

# Install pnpm globally (uncomment if needed)
RUN npm install -g pnpm

# Copy only package.json and pnpm-lock.yaml (or pnpm-lock.json) files
COPY package*.json pnpm-lock.* ./


# Run pnpm install to install dependencies
RUN npx pnpm install

# COPY stack.env .env

# Copy the rest of the application code
COPY . .

# Run pnpm build to build the application
# RUN pnpm build

# Expose port 4321 (optional, depending on your use case)
# EXPOSE 80

# Set the default command to run the application
# CMD ["node", "server.js"]
# CMD ["node", "run-server.mjs"]
CMD ["pnpm", "start"]
5 changes: 4 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import react from "@astrojs/react";
import cloudflare from "@astrojs/cloudflare";
import node from "@astrojs/node";

import mdx from "@astrojs/mdx";

Expand All @@ -16,5 +17,7 @@ export default defineConfig({
"Access-Control-Allow-Origin": "*"
}
},
adapter: cloudflare()
adapter: node({
mode: "middleware",
})
});
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"start": "pnpm build && node ./run-server.mjs",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
Expand All @@ -14,8 +14,11 @@
"dependencies": {
"@astrojs/cloudflare": "^7.6.4",
"@astrojs/mdx": "^1.1.4",
"@astrojs/node": "^6.0.4",
"@astrojs/react": "^3.0.4",
"@astrojs/tailwind": "^5.0.2",
"@fastify/middie": "^8.3.0",
"@fastify/static": "^6.12.0",
"@fontsource-variable/inter-tight": "^5.0.18",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
Expand All @@ -35,6 +38,7 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"daisyui": "^4.0.4",
"fastify": "^4.24.3",
"framer-motion": "^10.16.4",
"lucide-react": "^0.292.0",
"react": "^18.2.0",
Expand All @@ -57,4 +61,4 @@
"prettier-plugin-astro": "^0.12.1",
"sharp": "^0.32.6"
}
}
}
Loading

0 comments on commit 0793323

Please sign in to comment.