This repo is the root of the server.
Here we set up the nginx architecture and then link this to beatitud frontend and backend parts.
$ ssh ubuntu@beatitud.ioTo init submodules:
$ sudo git submodule initTo pull all git submodules:
$ sudo git submodule update --recursive --remoteTo build django only, without cache :
$ docker-compose build --no-cache django$ docker-compose up --build -dYou can check the config by replacing 'up -d' by 'config'.
Within Beatitud template you can use env var in this file witht the syntax
...
server {
...
server_name ${SPECIAL_DOMAIN}
...
}
docker-compose.ym
environment:
- NGINX_HOST=beatitud.io
- SPECIAL_DOMAIN=special.com
command: /bin/sh -c "envsubst '$${NGINX_HOST} $${SPECIAL_DOMAIN}' < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"
In the nginx container
envsubst < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf
nginx -s reloadNginx will generate its logs in the nginx/logs/ repo. There will be logs for every server of nginx. Then it's up to you to cross the information to get what you want.
First of all, the only two ports open are 80 and 443 (every connection on 80 will be redirect to 443).
- https://${NGINX_HOST} (landing page)
- https://staging.${NGINX_HOST} (link to staging code for front)
- https://staging.api.${NGINX_HOST} (link to staging code for back)
- https://showcase.${NGINX_HOST} (link to production code for front)
- https://showcase.api.${NGINX_HOST} (link to production code for back)