Initial Commit

This commit is contained in:
2026-02-12 23:41:57 -03:00
commit 624ca8a587
16599 changed files with 2062633 additions and 0 deletions

15
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# Dev container: Debian-based so bash is present (required by Cursor/VS Code).
# Production remains Alpine (see root Dockerfile).
FROM php:7.4-fpm
RUN apt-get update \
&& apt-get install -y --no-install-recommends nginx \
&& rm -rf /var/lib/apt/lists/*
COPY php/conf.d/ /usr/local/etc/php/conf.d/
COPY nginx/conf.d/ /etc/nginx/conf.d/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY src/ /usr/share/nginx/html/
ENTRYPOINT ["/entrypoint.sh"]

36
.devcontainer/README.md Normal file
View File

@@ -0,0 +1,36 @@
# Dev Container Local testing before deploy
This devcontainer runs PHP 7.4 + Nginx (Debian-based image so Cursors tooling has bash). Your `src/` folder is mounted over the web root so edits are reflected immediately.
## If “Reopen in Container” keeps failing (e.g. bash not found)
Cursor may be reusing an old container. Remove it and reopen:
1. **Reopen the folder locally** (not in the container).
2. In a terminal:
`docker rm -f 2476c6abaac7 2>/dev/null; docker ps -a | grep -i umlaut`
and remove any listed dev container for this project.
3. **Reopen in Container** again so a new container is created from the current image.
## How to use
1. **Open in Dev Container**
Command Palette → **“Dev Containers: Reopen in Container”** (or use the prompt when opening the folder).
2. **Wait for the container to build and start**
First time it builds the image; later opens are fast.
3. **Open the site in your browser**
When the container is running, open **http://localhost** (port 80 is forwarded).
- Main site: `http://localhost/`
- Archive (e.g. 2004): `http://localhost/site_archive/2004/`
4. **Edit and test**
Changes under `src/` are served immediately; refresh the browser to see them.
## Whats supported
- **HTML/CSS/JS** Served by Nginx with the existing cache rules.
- **PHP** Handled by PHP 7.4-FPM (same as production), including legacy archive pages under `site_archive/`.
The environment matches the production image; if it works here, it should behave the same when deployed.

View File

@@ -0,0 +1,28 @@
{
"name": "Umlaut Press (PHP 7.4 + Nginx)",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"runArgs": [
"-v", "${localWorkspaceFolder}/src:/usr/share/nginx/html"
],
"forwardPorts": [80],
"portsAttributes": {
"80": {
"label": "Site (HTTP)",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"extensions": [
"bmewburn.vscode-intelephense-client",
"xdebug.php-debug"
]
}
},
"postCreateCommand": "echo 'Dev container ready. Site will be at http://localhost when Nginx is running.'",
"postStartCommand": "/usr/local/sbin/php-fpm -D && nginx",
"remoteUser": "root"
}