diff --git a/.dockerignore b/.dockerignore index 2b515d7..e4a8411 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,27 +1,12 @@ -**/.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 the node_modules directory, as it will be installed inside the container +node_modules # Ignore Eleventy's default output directory -_site \ No newline at end of file +_site + +# Ignore npm debug logs +npm-debug.log + +# Ignore Docker files +Dockerfile +docker-compose.yml diff --git a/.env b/.env deleted file mode 100644 index 199fbb0..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -APP_URL=https://me.twk95.com \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index b97f68e..b9280f5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,11 +1,16 @@ { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", "configurations": [ + { - "name": "Containers: Node.js Launch", - "type": "docker", + "type": "dockerfile", "request": "launch", - "preLaunchTask": "docker-run: debug", - "platform": "node" + "name": "Docker: Build", + "dockerfile": "Dockerfile", + "contextPath": "${workspaceFolder}" } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index d416da5..0000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "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 - } - } - ] -} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 6b8fe35..993c21d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,8 @@ 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 ../ +WORKDIR /app +COPY package*.json ./ +RUN npm install COPY . . EXPOSE 8080 -RUN chown -R node /usr/src/app -USER node -CMD [ "npx", "@11ty/eleventy", "--serve"] +CMD [ "npx", "@11ty/eleventy", "--serve" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c2e9618..1e3701c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,17 +10,10 @@ services: # 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 - /app/node_modules - restart: unless-stopped labels: diun.enable: false homepage.group: Tools homepage.name: Eleventy homepage.icon: eleventy - homepage.href: ${APP_URL} -networks: {} -x-dockge: - urls: - - ${APP_URL} diff --git a/src/blog/test.md b/src/blog/test.md index dcb4cac..c7dc737 100644 --- a/src/blog/test.md +++ b/src/blog/test.md @@ -2,7 +2,6 @@ title: "Test page!" date: "2025-08-07" layout: "post.njk" -tags: "posts" excerpt: This post is a feature showcase of what you can do with Eleventy ---