Update readme and add docker files

This commit is contained in:
Jake R 2024-01-26 23:48:46 -08:00
parent db3ff53a8c
commit 2838cc7d35
3 changed files with 56 additions and 2 deletions

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
from node:latest
WORKDIR /srv/
COPY ./website/. /srv/website/
EXPOSE 3000
WORKDIR /srv/website
CMD [ "npx", "docusaurus", "start", "-h0.0.0.0" ]

View File

@ -1,2 +1,26 @@
# jake.runyan.dev
A personal website/blog, powered by the content-first & react-based web framework Docusaurus.
### First Time Setup
1. Install some node version >=18
`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash`
`nvm list-remote`
`nvm install 18.12.0`
2. Create node project, using classic theme
`npx create-docusaurus@latest website classic`
### Running the Project
1. Run locally with nvm
`cd website && npm run start`
2. Run as container with docker-compose
docker-compose build && docker-compose up -d && docker logs -f website

19
docker-compose.yml Normal file
View File

@ -0,0 +1,19 @@
version: "3"
networks:
traefik_traefik-network:
external: true
services:
website:
image: website:latest
container_name: website
build: .
networks:
- traefik_traefik-network
labels:
- traefik.http.routers.website.rule=Host(`jake.runyan.dev`)
- traefik.http.routers.website.tls=true
- traefik.http.routers.website.tls.certresolver=lets-encrypt
- traefik.http.services.website.loadbalancer.server.port=3000
- traefik.port=3002