+----------------------------------------------------------+
|                                                          |
|                                                          |
|                                                          |
+----------------------------------------------------------+


$

CLIC server

--> See the repository <--

Clic Server configuration

This repository contains the complete configuration of the Clic's server. It uses Ansible scripts for automated installation and deployment.

Playbooks

There are two playbooks, at the root of the repository:

Services

Each service has a dedicated role for deployment. It is called by the deploy.yaml playbook, and is given as parameter service the corresponding entry in the services dictionnary from the secrets file. Important: when using files/templates from the respective directories, it may be required to append the role_path variable at the start of the path (e.g. "{{ role_path }}/files/docker-compose.yaml").

If a service's role needs to generate a configuration file, it needs to be stored in the directory {{ general.config_dir }}/{{ SERVICE }} (general.config_dir is specified in the secrets.yaml file). It then must be mounted into the container using a bind mount. Since bind mounts do not allow to change the permissions/ownership of the file, the role must take care of setting those properly.

Caddy

Caddy is the reverse-proxy used to dispatch incoming HTTP requests to the different services. It also handles HTTPS with the client. It communicates with the services through HTTP, to avoid having to manage local certificates. Since it needs to handle connections on both IPv4 and IPv6, it needs to run on bare-metal, as docker swarm does not yet allow to bind to an IPv6 address.

Webhook

The webhook service is used to trigger (partial) re-deployment of the infrastructure. Unlike the other services, the webhook runs on bare metal, to be able to do all necessary modifications of the server.

It is designed to receive packages from GitHub, in order to automatically re-deploy services when they are updated. See the official documentation and the dedicated README.