⚙️ Configuration
🍃 Let's configure the docker stack.
Environment variables
👇 Edit your .env.local environment for init .env file
shell
make init-env
# cp .env.dist .env
make init-env
# cp .env.dist .env
Configure .env.local as needed (Change all the "change_me" values)
txt
# GENERAL settings
PROJECT_PATH=/var/www/leadersleague-v2
PATH_DUMP=/backup-leaders/24-03-23
# EMAIL
NR_EMAIL="noreply@leadersleague.com"
# EMAIL: Possible values: local, main
DC_FILE="local"
# ...
# MYSQL ---
MYSQL_DATABASE=db_leadersleague_v2_local
MYSQL_ROOT_USER=root
MYSQL_ROOT_PASSWORD=change_me
# ...
# GENERAL settings
PROJECT_PATH=/var/www/leadersleague-v2
PATH_DUMP=/backup-leaders/24-03-23
# EMAIL
NR_EMAIL="noreply@leadersleague.com"
# EMAIL: Possible values: local, main
DC_FILE="local"
# ...
# MYSQL ---
MYSQL_DATABASE=db_leadersleague_v2_local
MYSQL_ROOT_USER=root
MYSQL_ROOT_PASSWORD=change_me
# ...
🚨 Focused Line are important !
Entry Points
👇 Edit your /etc/hosts
file for adding entry points
shell
sudo nano /etc/hosts
sudo nano /etc/hosts
👇 Paste your entry point in /etc/hosts
after localhost 127.0.0.1 localhost
shell
#################################################
# LEADERS LEAGUE - V2
# --
127.0.0.1 leaders.local
127.0.0.1 portainer.leaders.local
127.0.0.1 phpmyadmin.leaders.local
127.0.0.1 admin.leaders.local
127.0.0.1 api.leaders.local
127.0.0.1 medias.leaders.local
127.0.0.1 labels.leaders.local
127.0.0.1 documentation.leaders.local
#################################################
# LEADERS LEAGUE - V2
# --
127.0.0.1 leaders.local
127.0.0.1 portainer.leaders.local
127.0.0.1 phpmyadmin.leaders.local
127.0.0.1 admin.leaders.local
127.0.0.1 api.leaders.local
127.0.0.1 medias.leaders.local
127.0.0.1 labels.leaders.local
127.0.0.1 documentation.leaders.local
shell
#################################################
# LEADERS LEAGUE - V2
# --
127.0.0.1 v2.leadersleague.com
127.0.0.1 pma.leadersleague.com
127.0.0.1 admin.leadersleague.com
127.0.0.1 api.leadersleague.com
127.0.0.1 medias.leadersleague.com
127.0.0.1 labels.leadersleague.com
127.0.0.1 drone.leadersleague.com
127.0.0.1 documentation.leadersleague.com
#################################################
# LEADERS LEAGUE - V2
# --
127.0.0.1 v2.leadersleague.com
127.0.0.1 pma.leadersleague.com
127.0.0.1 admin.leadersleague.com
127.0.0.1 api.leadersleague.com
127.0.0.1 medias.leadersleague.com
127.0.0.1 labels.leadersleague.com
127.0.0.1 drone.leadersleague.com
127.0.0.1 documentation.leadersleague.com
SSL Certificates
Local Self-Signed SSL Certificate
Run a temporary docker container from Alpine:3.17 and generate your self-signed key for https with the makefile helpers.
shellmake generate-ssl
make generate-ssl
The certificate will be generated in the
./docker/nginx/ssl
folder.Import the CA certificate into your web browser's trusted certificate store:
- Firefox:
about:preferences#privacy
- Chrome:
chrome://settings/certificates
- View Certificates > "Authorities" tab > Import
- Locate and import the
./docker/nginx/ssl/ca-selfsigned.pem
file
- Firefox:
Production Lets Encrypt SSL Certificate
INFO
🚧 Documentation in progress...
Save command online
shell
certbot certonly --webroot --webroot-path=/var/www/certbot/ --email noreply@leadersleague.com --agree-tos --keep-until-expiring --non-interactive -d v2.leadersleague.com -d api.leadersleague.com -d admin.leadersleague.com -d labels.leadersleague.com -d medias.leadersleague.com -d drone.leadersleague.com -d pma.leadersleague.com -d documentation.leadersleague.com
certbot certonly --webroot --webroot-path=/var/www/certbot/ --email noreply@leadersleague.com --agree-tos --keep-until-expiring --non-interactive -d v2.leadersleague.com -d api.leadersleague.com -d admin.leadersleague.com -d labels.leadersleague.com -d medias.leadersleague.com -d drone.leadersleague.com -d pma.leadersleague.com -d documentation.leadersleague.com