This website is built using Docusaurus 2, a modern static website generator.
# generate project skeleton
docker run -it --rm -p 3000:3000 --user node -w /opt/blog-docusaurus -v ${PWD}/:/opt/ --entrypoint /bin/sh node:lts-alpine
npx @docusaurus/init@latest init blog-docusaurus classic
cd blog-docusaurus/
# enter sh
docker run -it --rm -p 3000:3000 --user node -w /opt/blog-docusaurus -v ${PWD}/:/opt/blog-docusaurus/ --entrypoint /bin/sh node:lts-alpine
# start
docker run -it --rm -p 3000:3000 --user node -w /opt/blog-docusaurus -v ${PWD}/:/opt/blog-docusaurus/ node:lts-alpine npm start -- --host 0.0.0.0
This command starts a local development server. Go to http://localhost:3000
.
Most changes are reflected live without having to restart the server.
# build static content served by nginx
docker build -t ymuski/blog-docusaurus .
# run
docker run -d --restart=always -m 200m -p 8888:80 --name blog-docusaurus ymuski/blog-docusaurus
# push to dockerhub
docker push ymuski/blog-docusaurus
This project is licensed under the MIT License - see the LICENSE file for details