Skip to content

Commit a79c127

Browse files
committed
Merge branch 'main' into deploy/production
2 parents 2382cfe + 2f45596 commit a79c127

File tree

22 files changed

+342
-8
lines changed

22 files changed

+342
-8
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Bergen Meadow - Build and Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- 'deploy/production'
7+
paths:
8+
- 'apps/bergen-meadow/**'
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Login to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKERHUB_USERNAME }}
27+
password: ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+
- name: Build and push to DockerHub
30+
uses: docker/build-push-action@v5
31+
with:
32+
context: .
33+
push: true
34+
file: ./apps/bergen-meadow/Dockerfile
35+
tags: rjhilgefort/bergen-meadow:latest
36+
37+
- name: Build Monorepo Packages
38+
run: |
39+
npm install
40+
npm run build
41+
42+
- name: Deploy to Portainer
43+
uses: ./packages/portainer-stack-redeploy-action
44+
with:
45+
host: '${{ secrets.PORTAINER_URL }}'
46+
accessToken: '${{ secrets.PORTAINER_ACCESS_TOKEN }}'
47+
stackName: 'bergen-meadow-site'

apps/bergen-meadow/.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
npm-debug.log
3+
Dockerfile
4+
README.md
5+
.dockerignore
6+
.git
7+
.next
8+
.env*

apps/bergen-meadow/.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env.local
29+
.env.development.local
30+
.env.test.local
31+
.env.production.local
32+
33+
# vercel
34+
.vercel

apps/bergen-meadow/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM node:18-alpine AS base
2+
3+
FROM base AS builder
4+
RUN apk update
5+
RUN apk add --no-cache libc6-compat
6+
# Set working directory
7+
WORKDIR /app
8+
RUN yarn global add turbo@^2
9+
COPY . .
10+
11+
# Generate a partial monorepo with a pruned lockfile for a target workspace.
12+
RUN turbo prune @repo/bergen-meadow --docker
13+
14+
# Add lockfile and package.json's of isolated subworkspace
15+
FROM base AS installer
16+
RUN apk update
17+
RUN apk add --no-cache libc6-compat
18+
WORKDIR /app
19+
20+
# First install the dependencies (as they change less often)
21+
COPY --from=builder /app/out/json/ .
22+
RUN npm install
23+
24+
# Build the project
25+
COPY --from=builder /app/out/full/ .
26+
RUN npm run build
27+
28+
FROM base AS runner
29+
WORKDIR /app
30+
31+
# Don't run production as root
32+
RUN addgroup --system --gid 1001 nodejs
33+
RUN adduser --system --uid 1001 nextjs
34+
USER nextjs
35+
36+
# Automatically leverage output traces to reduce image size
37+
# https://nextjs.org/docs/advanced-features/output-file-tracing
38+
COPY --from=installer --chown=nextjs:nodejs /app/apps/bergen-meadow/.next/standalone ./
39+
COPY --from=installer --chown=nextjs:nodejs /app/apps/bergen-meadow/.next/static ./apps/bergen-meadow/.next/static
40+
COPY --from=installer --chown=nextjs:nodejs /app/apps/bergen-meadow/public ./apps/bergen-meadow/public
41+
42+
CMD ["node", "--experimental-modules", "apps/bergen-meadow/server.js"]

apps/bergen-meadow/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# @repo/bergen-meadow
2+
3+
## Getting Started
4+
5+
1. Install dependencies
6+
7+
```
8+
npm install
9+
```
10+
11+
2. Run the dev server
12+
13+
```
14+
npm run dev
15+
```
16+
17+
Or build for production:
18+
19+
```
20+
npm run build
21+
npm run start
22+
```
23+
24+
3. Docker
25+
26+
```
27+
docker build -t rjhilgefort/bergen-meadow:latest .
28+
docker push rjhilgefort/bergen-meadow:latest
29+
```

apps/bergen-meadow/TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TODO
2+
3+
- [ ] TODO

apps/bergen-meadow/app/favicon.ico

19 KB
Binary file not shown.

apps/bergen-meadow/app/globals.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@import 'tailwindcss';
2+
@plugin "@tailwindcss/typography";
3+
@plugin "daisyui" {
4+
themes: bumblebee --default;
5+
}

apps/bergen-meadow/app/layout.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { GoogleAnalytics } from '@next/third-parties/google'
2+
import { Outfit } from 'next/font/google'
3+
import './globals.css'
4+
5+
const inter = Outfit({ subsets: ['latin'] })
6+
7+
export default function RootLayout({
8+
children,
9+
}: Readonly<{
10+
children: React.ReactNode
11+
}>) {
12+
return (
13+
<html lang="en">
14+
<body className={inter.className}>{children}</body>
15+
<GoogleAnalytics gaId="TODO" />
16+
</html>
17+
)
18+
}

apps/bergen-meadow/app/page.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Metadata } from 'next'
2+
import { Card } from '@repo/ui/card'
3+
4+
export const metadata: Metadata = {
5+
title: 'Blank',
6+
description: 'Blank',
7+
}
8+
9+
export default function Home() {
10+
return (
11+
<div className="w-full">
12+
<h1>Hello, Bergen Meadow!</h1>
13+
</div>
14+
)
15+
}

0 commit comments

Comments
 (0)