beatitud / beatitud-server

Beatitud Server, with Nginx architecture and submodules such as Backend, Landing page, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Beatitud Server

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.

Connection to Beatitud VM

$ ssh ubuntu@beatitud.io

To init submodules:

$ sudo git submodule init

To pull all git submodules:

$ sudo git submodule update --recursive --remote

To build django only, without cache :

$  docker-compose build --no-cache django
$ docker-compose up --build -d

You can check the config by replacing 'up -d' by 'config'.

About Beatitud template

Within Beatitud template you can use env var in this file witht the syntax ${VAR_NAME} then you have to add in the docker-compose file in the command directive of nginx container. Next to $${NGINX_HOST} (double $ is important!). Ex: nginx.conf

...
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;'"

Reload a modification in nginx.conf

In the nginx container

envsubst < /etc/nginx/nginx.conf > /etc/nginx/nginx.conf
nginx -s reload

Logs

Nginx 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.

Domain registered

First of all, the only two ports open are 80 and 443 (every connection on 80 will be redirect to 443).

About

Beatitud Server, with Nginx architecture and submodules such as Backend, Landing page, etc.


Languages

Language:TypeScript 67.5%Language:CSS 22.3%Language:JavaScript 6.6%Language:Dockerfile 3.6%