-
Container FTP
- User:
admin
- Pass:
change_me
ftp://admin:change_me@leader_node_ip
- User:
-
One or more containers DB MariaDB with dashboard phpmyadmin
-
Container to execute cronjob
-
One or more containers for mail server with dashboard Docker Mailserver
-
Container front-end (webserser) (nginx)
-
Container reverse proxy with SSL traefik
-
Container PHP FPM - v7 or later
-
- NOTE: the acme.json file must be set with the 600 permission
-
homepage autoconfig (traefik-discovery)
- NOTE: the services.yaml must be set with the 600 permission
- The container is reachable only inside the docker network, use crontab to do the update (or refresh) of services, here the command:
curl -X POST services-discovery:5001/api/v1/homepage/update or curl -X POST services-discovery:5001/api/v1/homepage/refresh (delete and recreate all services)
In order to change the default values and password of the docker compose, you can create a .env
file in the root of the project and set the variables you want to change. .env.template
can be used as a template renaming it to .env
.
Define an .env
file in order to set the environment variables of ftp server, mariadb and phpmyadmin.
To start the stack using docker stack deploy, run the following command with admin privileges:
chmod -R 755 php
chmod 600 traefik/acme.json
chmod 600 homepage/config/services.yaml
docker network create --driver overlay net
docker stack deploy --compose-file docker-compose.yml web
A setup script is available in the scripts
folder in order to
- customize the hostname in the docker compose;
- set the credentials (of traefik basic auth) for the services;
- setup the permissions of the acme.json and services.yaml files;
- create the network (optional);
- deploy the stack (optional).
python3 scripts/setup.py <customer_name> <password> [-p] [path] [-n] [-d] [stack_name] [-h]
- customer_name: used to customize the hostname and to define the username for the basic auth
- password: for the basic auth
-p
or--path
: pass the path to use in order to go to the root of the project-n
or--network
: to create the docker network-d
or--deploy
: to deploy the stack- stack_name: the name of the stack (default: production)
-h
or--help
ansible-playbook playbook.yaml -e "customer=my_customer traefik_password=my_password deploy=-d"
Start the swarm and run the following command to add a user to the mail server (mandatory):
docker exec -ti <container-name> setup email add [email protected]
To configure the mail client, use the following settings for Thunderbird:
Open the Thunderbird client and go to the Account Settings
:
Select email esistente, Insert the name, email and password:
IMAP email.web.elemento.cloud STARTSSL 143
SMTP email.web.elemento.cloud 587
Then, select Configura manualmente
:
Select Fatto
and accept the menu pop-up.
In Elemento we use Google Style coding conventions.