VuePeople lists and connects Vue.JS developers around the world.
$ cd frontend
# install dependencies
$ yarn install
# copy .env.template in .env
$ cp .env.template .env
# add API key to .env as described in the template
# serve with hot reload at localhost:3000
$ yarn dev
# build for production and launch server
$ yarn build
$ yarn start
NEVER RUN THIS ON THE PRODUCTION SERVER
# Copy dummy self signed certs to Nginx folder:
$ cp nginx/dev_certs/cert.pem nginx/certs/cert.pem
$ cp nginx/dev_certs/chain.pem nginx/certs/chain.pem
$ cp nginx/dev_certs/key.pem nginx/certs/key.pem
# Tell node to ignore self signed certificate:
$ echo "NODE_TLS_REJECT_UNAUTHORIZED = '0'" >> .env
# start django in debug mode
change DEBUG=True in django/.env
# Build docker service with docker-compose
$ cd django
$ cp .env.template .env
$ cd ..
$ docker-compose build
$ docker-compose up -d
# Perform standard django initialization
$ docker-compose exec django python manage.py migrate
$ docker-compose exec django python manage.py createsuperuser
Deploy is done by CircleCi, manual deploy can be performed on a docker-compose enabled unix machine as follow:
git clone git@github.com:pulilab/vue-people.git
$ cd vue-people
$ docker-compose build
$ docker-compose up -d
# Set the Domain variable
export DOMAIN=NAME_OF_THE_DOMAIN
# Pull the docker image for certbot:
docker pull certbot/certbot
# Obtain the certificates
docker run -it --rm -v /home/$(whoami)/vue-people/nginx/certs:/etc/letsencrypt:rw -v /home/$(whoami)/vue-people/nginx/certs-data:/data/letsencrypt:rw deliverous/certbot certonly --webroot --webroot-path=/data/letsencrypt -d $DOMAIN
# copy the certbot certs:
sudo cp /home/$(whoami)/vue-people/nginx/certs/live/$DOMAIN/privkey.pem /home/$(whoami)/vue-people/nginx/certs/key.pem
sudo cp /home/$(whoami)/vue-people/nginx/certs/live/$DOMAIN/fullchain.pem /home/$(whoami)/vue-people/nginx/certs/chain.pem
sudo cp /home/$(whoami)/vue-people/nginx/certs/live/$DOMAIN/cert.pem /home/$(whoami)/vue-people/nginx/certs/cert.pem
# own the certificates:
sudo chown $(whoami):$(whoami) /home/$(whoami)/vue-people/nginx/certs/key.pem
sudo chown $(whoami):$(whoami) /home/$(whoami)/vue-people/nginx/certs/chain.pem
sudo chown $(whoami):$(whoami) /home/$(whoami)/vue-people/nginx/certs/cert.pem
# refresh certificates
docker run -it --rm -v /home/$(whoami)/vue-people/nginx/certs:/etc/letsencrypt:rw -v /home/$(whoami)/vue-people/nginx/certs-data:/data/letsencrypt:rw certbot/certbot renew --webroot --webroot-path=/data/letsencrypt
cd vue-people/frontend && yarn
yarn dev
cp .env.template .env
.env
and:
-- add NODE_TLS_REJECT_UNAUTHORIZED = '0'
-- add WEBSOCKET_PROTOCOL=ws
-- modify host
to host=0.0.0.0
cd ../django/ && cp .env.template .env
cd.. && docker-compose build
docker-compose up -d
docker-compose exec django python manage.py migrate
docker-compose exec django python manage.py createsuperuser
and follow the prompt to generate an admin userlocahost/admin
and login with the created credentialslocalhost
http://localhost
and callback url is: http://localhost/accounts/github/login/callback/