A template for web-apps
GPL-3.0 License
A template for web-apps
This is a template of a web application consisting of a SEVN-stack (sqlite3-express.js-vue.js-node.js), docker, and nginx. The SEVN stack is used to build a multi-page web application using Vue.js as JavaScript framework, Express.js and Node.js as web-framework, and SQLite3 as embedded JSON database. Nginx is used as a reverse-proxy in front of Express.js. The entire app is dockerized, such that building and running can be done easily with hardly any installation steps.
Download Miniconda first and install everything like this
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
conda create -n web python=3.7
echo "source ~/miniconda3/bin/activate web" >> ~/.bashrc
source ~/miniconda3/bin/activate web
conda install -y nodejs docker-compose
Install Docker. Then build the containers using
docker-compose up -d nginx
This should work. Check it out using
curl localhost:80
curl localhost:4000
If something is returned, the installation worked out and your server runs on port 80. You can rebuild everything using
docker-compose up --build
For debugging it makes sense to only build a container for the express app.
Instead of installing using docker-compose
, use
docker build -t webapp:0.1.0 .
docker run --name webapp -d -p 4000:4000 webapp:0.1.0
Check it out using
curl localhost:4000
If this works, then the express container works fine.
Run the express app using
docker start webapp
docker start nginx
Stop or remove using:
docker container stop webapp nginx
docker container rm webapp nginx
Simon Dirmeier simon.dirmeier @ web.de