Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects

Kuadrado Software Website

install

Prerequisite

  • docker
  • docker-compose
  • certbot for prod or mkcert for dev

TLS CERTS

  • Localhost

    With mkcert

    $ sudo mkdir -p /etc/letsencrypt/live/localhost
    $ sudo chmod 777 -R /etc/letsencryt/live/localhost
    $ mkcert -key-file privkey.pem -cert-file fullchain.pem localhost
  • Real server

    Install snapd and certbot at system level. https://certbot.eff.org/lets-encrypt/debianbuster-other

    Then run

    $ sudo certbot certonly --standalone

Build

$ git clone https://gitlab.com/kuadrado-software/kuadrado-website.git
$ cd kuadrado-website

$ touch ./.env
# Fill .env file with the required variables described below

# Build the website
$ cd website
$ npm install
$ npm run build
# or
$ npm run build-debug

$ cd ..

# build the image and run the container
$ docker-compose up --build
# Or
$ docker-compose -f ./dev.docker-compose.yml up --build

Expected environment variables

Env vars may be defined in a .env file at the root of the project

  • RELEASE_MODE: Can be either "debug", "test" or "prod". It's used to define the log level. Not required. Default is "prod"
  • SERVER_PORT: The port bound the Actix server
  • SERVER_PORT_TLS: The tls port bound the Actix server
  • SERVER_HOST: IP address or domain name hosting the API.
  • SERVER_PROTOCOL: http or https regarding the protocol used to connect the server
  • RESOURCES_DIR: A linux directory that will be used to mount static resources like certs and html files