Public Access
1
0

working base

This commit is contained in:
2025-08-05 18:04:18 -04:00
parent 7196580871
commit 5ae0732b6a
7 changed files with 125 additions and 0 deletions

27
.dockerignore Normal file
View File

@@ -0,0 +1,27 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
# Ignore Eleventy's default output directory
_site

11
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,11 @@
{
"configurations": [
{
"name": "Containers: Node.js Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"platform": "node"
}
]
}

39
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,39 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-build",
"label": "docker-build",
"platform": "node",
"dockerBuild": {
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"pull": true
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": [
"docker-build"
],
"platform": "node"
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": [
"docker-build"
],
"dockerRun": {
"env": {
"DEBUG": "*",
"NODE_ENV": "development"
}
},
"node": {
"enableDebugging": true
}
}
]
}

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM node:lts-alpine
ENV NODE_ENV=production
WORKDIR /usr/src/app
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent && mv node_modules ../
COPY . .
EXPOSE 8080
RUN chown -R node /usr/src/app
USER node
CMD [ "npx", "@11ty/eleventy", "--serve"]

15
docker-compose.yml Normal file
View File

@@ -0,0 +1,15 @@
services:
eleventy:
# Build the Docker image from the Dockerfile in the current directory
build: .
# Name the container for easier reference
container_name: eleventy_dev
# Map port 8080 on the host to port 8080 in the container
ports:
- "8080:8080"
# Mount the current directory on the host to /app in the container
# This allows for live-reloading as you edit your files locally
volumes:
- .:/usr/src/app
# Anonymize the node_modules directory to prevent conflicts with local modules
- /app/node_modules

4
index.md Normal file
View File

@@ -0,0 +1,4 @@
---
title: Heading
---
# {{ title }}

19
package.json Normal file
View File

@@ -0,0 +1,19 @@
{
"name": "eleventy",
"version": "1.0.0",
"description": "A basic Eleventy project.",
"main": "index.js",
"scripts": {
"start": "npx @11ty/eleventy --serve",
"build": "npx @11ty/eleventy"
},
"keywords": [
"eleventy",
"static-site-generator"
],
"author": "",
"license": "ISC",
"devDependencies": {
"@11ty/eleventy": "^2.0.1"
}
}