|
@@ -0,0 +1,48 @@
|
|
1
|
++++
|
|
2
|
++++
|
|
3
|
+
|
|
4
|
+:source-highlighter: pygments
|
|
5
|
+
|
|
6
|
+== Docker
|
|
7
|
+
|
|
8
|
+=== Compose file snippets
|
|
9
|
+
|
|
10
|
+==== General template
|
|
11
|
+
|
|
12
|
+[source,yaml]
|
|
13
|
+----
|
|
14
|
+version: '3.7'
|
|
15
|
+
|
|
16
|
+services:
|
|
17
|
+ name:
|
|
18
|
+ image: x/y:z
|
|
19
|
+ volumes:
|
|
20
|
+ - host/path:/container/path
|
|
21
|
+ - custom:/container/path
|
|
22
|
+ environment:
|
|
23
|
+ FOO: bar
|
|
24
|
+ restart: always
|
|
25
|
+
|
|
26
|
+networks:
|
|
27
|
+ custom:
|
|
28
|
+ external: true
|
|
29
|
+
|
|
30
|
+volumes:
|
|
31
|
+ custom:
|
|
32
|
+----
|
|
33
|
+
|
|
34
|
+==== MySQL/MariaDB
|
|
35
|
+
|
|
36
|
+[source,yaml]
|
|
37
|
+----
|
|
38
|
+ db:
|
|
39
|
+ image: mariadb:latest
|
|
40
|
+ volumes:
|
|
41
|
+ - mariadb_data:/var/lib/mysql
|
|
42
|
+ restart: always
|
|
43
|
+ environment:
|
|
44
|
+ MYSQL_DATABASE: app_name
|
|
45
|
+ MYSQL_USER: app_name
|
|
46
|
+ MYSQL_PASSWORD: app_password
|
|
47
|
+ MYSQL_ROOT_PASSWORD: random_password
|
|
48
|
+----
|