Skip to content

Commit

Permalink
feat!: v2 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
deeprobin authored Jul 26, 2023
1 parent 815f998 commit 28ff5be
Show file tree
Hide file tree
Showing 241 changed files with 34,347 additions and 18,446 deletions.
4 changes: 0 additions & 4 deletions .actrc

This file was deleted.

5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.vscode
public
node_modules
dist
.env
5 changes: 0 additions & 5 deletions .firebaserc

This file was deleted.

43 changes: 24 additions & 19 deletions .github/workflows/deploy-prod.yml β†’ .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name: Deploy to Live Channel

name: CI
on:
push:
branches:
- main
# Optionally configure to run only for specific files. For example:
# paths:
# - "website/**"
pull_request:
branches:
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
deploy_live_website:
site:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
Expand All @@ -41,12 +39,19 @@ jobs:
- name: Install dependencies
run: pnpm install
- name: Build
env:
NODE_ENV: production

- name: Build astro site
run: pnpm build
- uses: FirebaseExtended/action-hosting-deploy@v0

- name: Run tests
run: pnpm test
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build container
uses: docker/build-push-action@v2
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
channelId: live
push: false
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
50 changes: 0 additions & 50 deletions .github/workflows/deploy-preview.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish to Container Registry
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,11 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
firebase-error.log*
firebase-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

.firebase
.actrc
act

dev-dist
act
14 changes: 0 additions & 14 deletions .hintrc

This file was deleted.

3 changes: 0 additions & 3 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
auto-install-peers=true
# Until astro-rome peers are fixed:
strict-peer-dependencies=false
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:20-alpine3.18 AS build
ENV NODE_ENV=production

WORKDIR /usr/src/app
RUN corepack enable && corepack prepare pnpm@latest --activate

COPY .npmrc package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod

COPY . .
RUN pnpm build --production

FROM node:20-alpine3.18 AS runtime
LABEL org.opencontainers.image.title="Lindner IT Website"
LABEL org.opencontainers.image.description="Node HTTP-Server for Lindner IT Website (using Astro: SSR + SSG)"
LABEL org.opencontainers.image.authors="Robin Lindner <[email protected]>"
LABEL org.opencontainers.image.vendor="Lindner IT UG (haftungsbeschrΓ€nkt)"
LABEL org.opencontainers.image.licenses="UNLICENSED"
LABEL org.opencontainers.image.source="https://github.com/lindner-development/website"
LABEL org.opencontainers.image.url="https://lindnerit.io"

WORKDIR /usr/src/app
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=80

COPY --from=build /usr/src/app/ /usr/src/app/
ENTRYPOINT ["node", "dist/server/entry.mjs"]
5 changes: 5 additions & 0 deletions Dockerfile.bun
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM oven/bun:latest AS build
COPY . .
RUN bun install && \
bun run build
ENTRYPOINT [ "bun", "preview" ]
47 changes: 2 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,3 @@
# Astro Starter Kit: Minimal
# Lindner IT Website

```
npm create astro@latest -- --template minimal
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/s/github/withastro/astro/tree/latest/examples/minimal)

> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun!
## πŸš€ Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
/
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚ └── pages/
β”‚ └── index.astro
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :--------------------- | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro --help` | Get help using the Astro CLI |

## πŸ‘€ Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
Website of Lindner IT
Loading

0 comments on commit 28ff5be

Please sign in to comment.