Compare commits
2 Commits
dev
...
a5bdf7b4f5
| Author | SHA1 | Date | |
|---|---|---|---|
| a5bdf7b4f5 | |||
| 03671a4d3e |
1
.gitignore
vendored
1
.gitignore
vendored
@ -16,6 +16,7 @@ pnpm-debug.log*
|
||||
# environment variables
|
||||
.env
|
||||
.env.production
|
||||
.env.local
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
|
||||
14
Dockerfile
14
Dockerfile
@ -3,23 +3,27 @@ FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
RUN npm install
|
||||
|
||||
COPY ../backup/backup .
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine AS production
|
||||
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install -g serve
|
||||
# Copy built app and minimal runtime files
|
||||
COPY --from=build /app/dist /app/dist
|
||||
COPY --from=build /app/package*.json /app/
|
||||
|
||||
COPY --from=build /app/dist /app
|
||||
RUN npm pkg delete devDependencies || true
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["serve", "-s", ".", "-l", "3000"]
|
||||
# Run Astro server entry (node adapter standalone)
|
||||
CMD ["node", "dist/server/entry.mjs"]
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget -qO- http://localhost:3000/ || exit 1
|
||||
86
README.md
86
README.md
@ -1,47 +1,55 @@
|
||||
# Astro Starter Kit: Minimal
|
||||
# Gallus Pub Website
|
||||
|
||||
This is the Gallus Pub website built with Astro. It includes an admin area at `/admin` for editing content (events, gallery, texts). Changes are committed back to the Git repository via the Gitea API which triggers your Woodpecker + Fly.io deployment pipeline.
|
||||
|
||||
## Local development
|
||||
|
||||
To run the site locally with OAuth login (Gitea):
|
||||
|
||||
1. Copy the example env file and fill values:
|
||||
```bash
|
||||
cp .env.example .env.local
|
||||
```
|
||||
- Create a Gitea OAuth application with Redirect URI: `http://localhost:4321/api/auth/callback`.
|
||||
- Set `OAUTH_CLIENT_ID` and `OAUTH_CLIENT_SECRET` from Gitea.
|
||||
- Set `GITEA_OWNER`, `GITEA_REPO`, and a `GITEA_TOKEN` (PAT) with write access to the repo.
|
||||
- Generate random secrets for sessions/CSRF (e.g. `openssl rand -hex 32`).
|
||||
|
||||
2. Install dependencies:
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
3. Start dev server using your local env file:
|
||||
```bash
|
||||
npm run dev:local
|
||||
```
|
||||
The site runs at http://localhost:4321. Visit http://localhost:4321/admin to log in via Gitea OAuth.
|
||||
|
||||
Notes:
|
||||
- If OAuth variables are missing or malformed, the auth endpoints return a clear 500 with guidance instead of crashing.
|
||||
- Production secrets are configured on Fly.io; `.env.local` is ignored by Git.
|
||||
|
||||
## Project structure
|
||||
|
||||
```sh
|
||||
npm create astro@latest -- --template minimal
|
||||
```
|
||||
|
||||
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
|
||||
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal)
|
||||
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json)
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
|
||||
```text
|
||||
/
|
||||
├── public/
|
||||
├── public/ # static assets
|
||||
├── src/
|
||||
│ └── pages/
|
||||
│ └── index.astro
|
||||
│ ├── content/ # editable JSON content (events, gallery)
|
||||
│ ├── pages/ # Astro pages, includes /admin and API routes
|
||||
│ ├── components/ # UI components
|
||||
│ └── utils/ # session helpers
|
||||
├── .env.example # template for local env
|
||||
├── fly.toml # Fly.io config
|
||||
├── Dockerfile
|
||||
└── 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.
|
||||
## Commands
|
||||
|
||||
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:4321` |
|
||||
| `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).
|
||||
- `npm install` – install deps
|
||||
- `npm run dev` – dev server without loading .env.local (expects env to be present in the shell)
|
||||
- `npm run dev:local` – dev server loading `.env.local` via dotenv-cli
|
||||
- `npm run build` – production build (SSR via @astrojs/node)
|
||||
- `npm run preview` – preview the production build
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import node from '@astrojs/node';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({});
|
||||
export default defineConfig({
|
||||
output: 'server',
|
||||
adapter: node({ mode: 'standalone' })
|
||||
});
|
||||
|
||||
907
package-lock.json
generated
907
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,19 @@
|
||||
{
|
||||
"name": "",
|
||||
"name": "gallus-pub",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"dev:local": "dotenv -e .env.local -- astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": "^5.12.0"
|
||||
"astro": "^5.12.8",
|
||||
"@astrojs/node": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dotenv-cli": "^7.4.1"
|
||||
}
|
||||
}
|
||||
@ -6,10 +6,6 @@ const currentYear = new Date().getFullYear();
|
||||
|
||||
<footer class="footer">
|
||||
<div class="footer-content">
|
||||
<div class="copyright">
|
||||
© {currentYear} Gallus Pub. Alle Rechte vorbehalten.
|
||||
</div>
|
||||
|
||||
<div class="footer-sections">
|
||||
<div class="footer-section">
|
||||
<h3>Öffnungszeiten</h3>
|
||||
@ -24,20 +20,22 @@ const currentYear = new Date().getFullYear();
|
||||
<p>Gallus Pub</p>
|
||||
<p>Metzgergasse 13</p>
|
||||
<p>9000 St. Gallen</p>
|
||||
<p>Reservierungen via Whatsapp</p>
|
||||
<p><a href="tel:0772322770">077 232 27 70</a></p>
|
||||
<p>Email:</p>
|
||||
<p><a href="mailto:info@gallus-pub.ch">info@gallus-pub.ch</a></p>
|
||||
</div>
|
||||
|
||||
<div class="footer-section">
|
||||
<h3>Raumreservationen</h3>
|
||||
<p>Du planst einen Event?</p>
|
||||
<p>Der "St.Gallerruum" im 2.OG</p>
|
||||
<p>kann gemietet werden.</p>
|
||||
<br/>
|
||||
<p>Gerne öffnen wir auf Anfrage</p>
|
||||
<p>auch ausserhalb unserer</p>
|
||||
<p>Betriebszeiten.</p>
|
||||
<p>Kann gemietet werden.</p>
|
||||
<p>Reservierungen via Whatsapp</p>
|
||||
<p><a href="tel:0772322770">077 232 27 70</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="copyright">
|
||||
© {currentYear} Gallus Pub. Alle Rechte vorbehalten.
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@ -9,9 +9,6 @@ const { title, description, image = "", date } = Astro.props;
|
||||
<img class="card-image" src={image} alt={title} />
|
||||
</div>
|
||||
|
||||
<h3 class="card-title" set:html={title} />
|
||||
<h4 class="card_date">{date}</h4>
|
||||
|
||||
<div class="hover-text">
|
||||
<p set:html={description} />
|
||||
</div>
|
||||
|
||||
@ -9,62 +9,9 @@ import ImageCarousel from "../components/ImageCarousel.astro";
|
||||
import Contact from "../components/Contact.astro";
|
||||
import About from "../components/About.astro";
|
||||
|
||||
const events = [
|
||||
{
|
||||
image: "/images/karaoke.jpg",
|
||||
title: "Karaoke",
|
||||
date: "Mittwoch - Samstag",
|
||||
description: `
|
||||
Bei uns gibt es Karaoke Mi-Sa!! <br>
|
||||
Seid ihr eine Gruppe und lieber unter euch? ..unseren 2.Stock kannst du auch mieten ;) <br>
|
||||
Reserviere am besten gleich per Whatsapp <a href="tel:+41772322770">077 232 27 70</a>
|
||||
`,
|
||||
},
|
||||
{
|
||||
image: "/images/pub_quiz.jpg",
|
||||
title: "Pub Quiz",
|
||||
date: "Jeden Freitag",
|
||||
description: `
|
||||
Jeden Freitag findet unser <b>Pub Quiz</b> statt. Gespielt wird tischweise in 3-4 Runden. <br>
|
||||
Jede Woche gibt es ein anderes Thema. Es geht um Ruhm und Ehre und zusätzlich werden die Sieger der Herzen durch das Publikum gekürt! <3 <br>
|
||||
Auch Einzelpersonen sind herzlich willkommen! <br>
|
||||
*zum mitmachen minimum 1 Getränk konsumieren oder 5CHF
|
||||
`,
|
||||
},
|
||||
{
|
||||
image: "/images/crepes_sucette.jpg",
|
||||
title: "Crepes Sucette <br /> Live Music im Gallus Pub!",
|
||||
date: "Do, 04. September 2025",
|
||||
description: `
|
||||
<b>20:00 Uhr</b> <br>
|
||||
<a href="Metzgergasse 13, 9000 St. Gallen">Metzgergasse 13, 9000 St. Gallen</a> <br>
|
||||
Erlebt einen musikalischen Abend mit der Band <b>Crepes Sucette</b> <br>
|
||||
Jetzt reservieren: <a href="tel:+41772322770">077 232 27 70</a>`,
|
||||
},
|
||||
{
|
||||
image: "/images/kevin_mcflannigan.jpeg",
|
||||
title: "Kevin McFlannigan <br> Live Music im Gallus Pub!",
|
||||
date: "Sa, 27. September 2025",
|
||||
description: `
|
||||
<b>ab 20:00 Uhr</b> <br>
|
||||
Singer & Songwriter Kevin McFlannigan <br>
|
||||
Eintritt ist Frei / Hutkollekte <br>
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
const images = [
|
||||
{ src: "/images/Logo.png", alt: "Erstes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Zweites Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Drittes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Viertes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Fünftes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Sechstes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Siebtes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Achtes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Neuntes Bild" },
|
||||
{ src: "/images/Logo.png", alt: "Zehntes Bild" },
|
||||
];
|
||||
// Inhalte aus Dateien laden (editierbar über Admin)
|
||||
import events from "../content/events.json";
|
||||
import images from "../content/gallery.json";
|
||||
---
|
||||
|
||||
<Layout>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
.Drinks {
|
||||
font-family: var(--font-family-primary);
|
||||
font-family: var(--font-family-primary), serif;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
@ -81,8 +81,8 @@
|
||||
}
|
||||
|
||||
.circle {
|
||||
height: 6em;
|
||||
width: 6em;
|
||||
height: 9em;
|
||||
width: 9em;
|
||||
border: 2px solid var(--color-accent-beige);
|
||||
border-radius: 50%;
|
||||
margin: 0.5rem;
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
|
||||
.copyright {
|
||||
text-align: center;
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
margin-top: 2rem;
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.footer-sections {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
.hover-card {
|
||||
position: relative;
|
||||
width: 350px;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
border-radius: var(--border-radius);
|
||||
background-color: var(--color-accent-green);
|
||||
@ -16,15 +16,6 @@
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
padding: 15px 15px 5px 15px;
|
||||
margin: 0;
|
||||
color: var(--color-accent-beige);
|
||||
font-size: var(--font-size-medium);
|
||||
text-align: center;
|
||||
order: -2;
|
||||
}
|
||||
|
||||
.card_date {
|
||||
padding: 0 15px 15px 15px;
|
||||
margin: 0;
|
||||
|
||||
Reference in New Issue
Block a user