The very front of 2123.io and the whole qd-platform
To run qd-front on your local machine:
- add
127.0.0.1 2123.qdto yourhosts; - clone this repo;
- put
fullchain.pemandprivkey.pemfrom 21/23 Google Drive storage into./cert/directory; sh build.dev.sh;sh run.dev.sh;- open in your browser
https://2123.dq/;
In dev no UI is built, so in order to see *qd UI - go to the appropriate repo and run npm run build:local.
To deploy qd-front:
- clone this repo;
- put
fullchain.pemandprivkey.pemfrom 21/23 Google Drive storage into./cert/directory; sh build.shsh run.shsh build.ui.sh
In prod no UI is built, so in order to see *qd UI - run an appropriate build script per each UI or run build.ui.sh to build all the UI-s. To build, for instance, cssqd UI only - run build.ui.cssqd.sh.
envsubstshould be used to configure reverse proxy's URI
dev:
- uses certificates from
./cert/, doen't generate new ones; - reverse proxy is pointed back to the host machine;
prod:
- runs weekly cron job to refresh certificates;
- reverse proxy is pointed back to the 2123 ultra machine;
To keep static data in one place. The reverse-proxied backend only verifies a single client request and responses with appropriate HTTP status code. Lua scripts just handle these codes and either redirect to login page or send to the client the required file. This helps to store static data only in one place - qd-front.
Alpine linux image is very limited. qd-front container inherits from openresty which already has its own CMD. So in order not to hardcode openresty start command, but at the same time be able to run more than one process - run(.dev).sh executes also some predefined scripts.
For dev - they are required to work with https: on local machine. For prod - they're required to run initial nginx which is needed for certificates refresh.