No frills Next.js + Chakra based UI for movie library maintenance.
Works well with a mock api provided in ./mock-api.
Then:
npm run devOpen http://localhost:3000 with your browser.
docker build -t make-movies-ui .
docker run -it --rm -p 3000:3000 make-movies-uiFor simplicity, I run this on Ubuntu via systemd.
-
Build and copy an export to a central place (note there is some juggling here, all documented via Next.js).
npm install npm run build mkdir -p /opt/make-movies/ui cp -r .next/standalone/* /opt/make-movies/ui cp -r .next/standalone/.next /opt/make-movies/ui/.next cp -r public /opt/make-movies/ui/public cp -r .next/static /opt/make-movies/ui/.next/static -
Create systemd unit in
/etc/systemd/system/make-movies-ui.service:[Unit] Description=Make movies UI Wants=network-online.target After=network-online.target [Service] Type=simple Restart=on-failure WorkingDirectory=/opt/make-movies/ui ExecStart=node /opt/make-movies/ui/server.js [Install] WantedBy=default.target
-
Reload systemd, start and enable the service:
sudo systemctl daemon-reload sudo systemctl enable make-movies-ui sudo systemctl start make-movies-ui -
Browse to http://localhost:3000