Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Guides section #43

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions _docs/guides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Guides & Tutorials
order: 5
---

# Guides & Tutorials

Most of the configurations 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
```