From d07e0a6863059b608845b1626a1afc7a025f1061 Mon Sep 17 00:00:00 2001 From: Guillaume Briday <8252238+guillaumebriday@users.noreply.github.com> Date: Tue, 21 Nov 2023 19:57:01 +0000 Subject: [PATCH] Create Guides section --- _docs/guides | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 _docs/guides diff --git a/_docs/guides b/_docs/guides new file mode 100644 index 0000000..9dbe79c --- /dev/null +++ b/_docs/guides @@ -0,0 +1,61 @@ +--- +title: Guides & Tutorials +order: 5 +--- + +# Guides & Tutorials + +Most of configuration are the same, here are few examples that you can adapt according to your needs. + +## Common accessories configurations + +### PostgreSQL + +```yml +accessories: + db: + image: postgres:15 + host: 192.168.0.1 + port: 5432:5432 + env: + secret: + - DATABASE_URL + files: + - config/init.sql:/docker-entrypoint-initdb.d/setup.sql + directories: + - data:/var/lib/postgresql/data +``` + +With `config/init.sql` as: +```sql +-- config/init.sql +CREATE DATABASE myapp_production; +``` + +### MySQL + +```yml +accessories: + db: + image: mysql:5.7 + host: 192.168.0.1 + port: 3306:3306 + env: + clear: + MYSQL_ROOT_HOST: '%' + secret: + - MYSQL_ROOT_PASSWORD + directories: + - data:/var/lib/mysql +``` + +### Redis + +```yml +accessories: + redis: + image: redis:latest + port: 6379:6379 + volumes: + - cache:/data +```