File tree 3 files changed +69
-0
lines changed
3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ docker-compose.yaml
5
5
katenary
6
6
* .env
7
7
docker-compose *
8
+ ! examples /** /docker-compose *
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+
5
+ webapp :
6
+ image : php:7-apache
7
+
8
+ environment :
9
+ DB_HOST : database
10
+ ports :
11
+ - " 8080:80"
12
+ labels :
13
+ # expose an ingress
14
+ katenary.io/ingress : 80
15
+ # DB_HOST is actually a service name
16
+ katenary.io/env-to-service : DB_HOST
17
+ depends_on :
18
+ - database
19
+
20
+ database :
21
+ image : mariadb:10
22
+ environment :
23
+ MARIADB_ROOT_PASSWORD : foobar
24
+ MARIADB_USER : foo
25
+ MARIADB_PASSWORD : foo
26
+ MARIADB_DATABASE : myapp
27
+ labels :
28
+ # because we don't provide "ports" or "expose", alert katenary
29
+ # to use the mysql port for service declaration
30
+ katenary.io/ports : 3306
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+
5
+ http :
6
+ image : nginx:alpine
7
+ ports :
8
+ - " 8080:80"
9
+ volumes :
10
+ - " sock:/sock"
11
+ - " ./config/nginx:/etc/nginx/conf.d:z"
12
+
13
+ labels :
14
+ # the "sock" volume will need to be shared to the same pod, so let's
15
+ # declare that this is not a PVC
16
+ katenary.io/empty-dirs : sock
17
+
18
+ # use ./config/nginx as a configMap
19
+ katenary.io/configmap-volumes : ./config/nginx
20
+
21
+ # declare an ingress
22
+ katenary.io/ingress : 80
23
+
24
+ php :
25
+ image : php:fpm
26
+ volumes :
27
+ - " sock:/sock"
28
+ - " ./config/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:z"
29
+ labels :
30
+ # fpm will need to use a unix socket shared
31
+ # with nginx (http service above), so we want here
32
+ # make a single pod containing nginx and php
33
+ katenary.io/same-pod : http
34
+ # use the ./config/php files as a configMap
35
+ katenary.io/configmap-volumes : ./config/php/www.conf
36
+
37
+ volumes :
38
+ sock :
You can’t perform that action at this time.
0 commit comments