You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# core
All service deployment files (Dockerfiles, docker-compose, tools) used for 42l's production server.
![Folder architecture diagram](.git-assets/folder-architecture-diagram.png)
### Installation
This repository must be cloned in the docker users home folder (`/home/$USER/core`). This path is hardcoded [here](https://git.42l.fr/42l/core/src/commit/aaf77b9ffe6d2e981258d6e084233a6b8f6bef97/manager.sh#L199) but should be quite easy to customize. For most of our production uses, this path will be used.
### Usage
#### `manager register`
Creates the `manager` symlink in `/usr/local/bin` and register autocompletions for the fish shell.
For the first run, you should directly execute `./manager.sh register` so `manager` is effective from any working directory.
#### `manager start|stop|restart|reload <service_name>`
Control containers listed in `services/`.
#### `manager build <service_name>`
Build Docker images for containers listed in `services/`. Can only work if the service has a `Dockerfile`.
#### `manager image start <image_name>`
Start one of the images listed in `images/` for temporary use.
#### `manager image build <image_name>`
Build one of the Docker images listed in `images/`. Can only work if the image has a `Dockerfile`.
#### `manager audit [service_name]`
Lists all containers and displays security information and other runtime parameters. See below.
Does not list services containing the `.disabled` file in their folder.
![Manager's audit function](.git-assets/audit-screenshot.png)
### License
This repository and its contents are under the **[MPL-2.0 license](.git-assets/LICENSE)**.