File tree 1 file changed +61
-0
lines changed
1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Guides & Tutorials
3
+ order : 5
4
+ ---
5
+
6
+ # Guides & Tutorials
7
+
8
+ Most of the configurations are the same, here are few examples that you can adapt according to your needs.
9
+
10
+ ## Common accessories configurations
11
+
12
+ ### PostgreSQL
13
+
14
+ ``` yml
15
+ accessories :
16
+ db :
17
+ image : postgres:15
18
+ host : 192.168.0.1
19
+ port : 5432:5432
20
+ env :
21
+ secret :
22
+ - DATABASE_URL
23
+ files :
24
+ - config/init.sql:/docker-entrypoint-initdb.d/setup.sql
25
+ directories :
26
+ - data:/var/lib/postgresql/data
27
+ ` ` `
28
+
29
+ With ` config/init.sql` as:
30
+ ` ` ` sql
31
+ -- config/init.sql
32
+ CREATE DATABASE myapp_production;
33
+ ` ` `
34
+
35
+ # ## MySQL
36
+
37
+ ` ` ` yml
38
+ accessories:
39
+ db:
40
+ image: mysql:5.7
41
+ host: 192.168.0.1
42
+ port: 3306:3306
43
+ env:
44
+ clear:
45
+ MYSQL_ROOT_HOST: '%'
46
+ secret:
47
+ - MYSQL_ROOT_PASSWORD
48
+ directories:
49
+ - data:/var/lib/mysql
50
+ ` ` `
51
+
52
+ # ## Redis
53
+
54
+ ` ` ` yml
55
+ accessories:
56
+ redis:
57
+ image: redis:latest
58
+ port: 6379:6379
59
+ volumes:
60
+ - cache:/data
61
+ ` ` `
You can’t perform that action at this time.
0 commit comments