no docker
Some checks are pending
/ deploy (push) Waiting to run

This commit is contained in:
Loyyd 2026-06-11 08:43:14 +02:00
parent d3746d8117
commit 189e2b6052
5 changed files with 22 additions and 53 deletions

View file

@ -48,18 +48,15 @@ For Astro development:
npm run dev
```
For the Nginx preview:
For a production-style Astro preview:
```bash
npm run build
```
```bash
docker compose up
npm run preview
```
Then open:
```text
http://localhost:8080/
http://localhost:4321/
```

View file

@ -56,20 +56,32 @@ npm run render:layout
## Local Preview
Build the Astro output first:
Run Astro locally while editing:
```bash
npm run dev
```
Then open Astro's local URL, usually:
```text
http://localhost:4321/
```
For a production-style Astro preview, build the static output first:
```bash
npm run build
```
Then serve `dist/` with Docker:
Then serve `dist/` with Astro preview:
```bash
docker compose up
npm run preview
```
Then open:
```text
http://localhost:8080/
http://localhost:4321/
```

View file

@ -1,8 +0,0 @@
services:
website:
image: nginx:alpine
ports:
- "${PORT:-8080}:80"
volumes:
- .:/usr/share/nginx/html:ro
- ./docker/default.conf.template:/etc/nginx/templates/default.conf.template:ro

View file

@ -1,31 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html/dist;
index index.html;
location ~ /\. {
return 404;
}
location / {
try_files $uri $uri/ =404;
}
location /assets/ {
alias /usr/share/nginx/html/dist/assets/;
try_files $uri =404;
}
location /css/ {
alias /usr/share/nginx/html/dist/css/;
try_files $uri =404;
}
location /js/ {
alias /usr/share/nginx/html/dist/js/;
try_files $uri =404;
}
}

View file

@ -37,7 +37,6 @@ is kept in `website/`, while Astro emits the served site into `dist/`.
- `scripts/copy-static-assets.mjs` - copies `assets/`, `css/`, and `js/` into `dist/`
- `scripts/extract-content.mjs` - extracts dated post pages into `content/`
- `scripts/extract-theme-css.mjs` - extracts repeated inline CSS into `css/theme.css` and `css/site.css`
- `docker/` and `compose.yaml` - local static server preview
- `.forgejo/` - deployment automation
## Shared Layout
@ -80,15 +79,15 @@ Then open Astro's local URL, usually:
http://localhost:4321
```
For the Nginx preview, build first:
For a production-style Astro preview, build first:
```bash
npm run build
docker compose up
npm run preview
```
Then open:
```text
http://localhost:8080
http://localhost:4321
```