Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.82 KB

readme.MD

File metadata and controls

55 lines (40 loc) · 1.82 KB

About

The code for the https://nastojte.cz site.

Webpack 5

npm run build does not work on WIndows due to Prerender SPA plugin rewriting index.html. Docker container must be used to build the web locally.

When using already prepared docker container:

  • Run intractively
  • Then in shell in the container:
cd /root/nastojte-cz
git pull
npm i
npm run build
http-server dist
  • Visit http://localhost:8080 on local machine

Creating docker container

  • On host: docker build -t "nastojtewebpackfive:Dockerfile" .
  • Then in interactive shell in the container (this can't be automated as each of the RUN commands in Dockerfile runs in a new shell so ssh agent won't keep runing):
apt update
apt install --assume-yes libx11-xcb1 libasound2 x11-apps libice6 libsm6 libxaw7 libxft2 libxmu6 libxpm4 libxt6 x11-apps xbitmaps x11-common libxcomposite1 libxdamage1 chromium libxss1
mkdir /root/.ssh
cd /root/.ssh
echo "<PRIVATE KEY>" > id_rsa
cd /root
chmod 700 -R ~/.ssh
ssh-add ~/.ssh/id_rsa
git clone git@github.com:oookoook/nastojte-cz.git
npm i -g http-server
  • Then continue with normal process as above - git pull etc.

Full list of apt install commands:

apt install --assume-yes libx11-xcb1 libasound2 x11-apps libice6 libsm6 libxaw7 libxft2 libxmu6 libxpm4 libxt6 x11-apps xbitmaps x11-common libxcomposite1 libxdamage1 chromium libxss1

Notes