Skip to content

Commit 16fddbc

Browse files
committed
Fixed ignore list
1 parent 8543bc5 commit 16fddbc

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ docker-compose.yaml
55
katenary
66
*.env
77
docker-compose*
8+
!examples/**/docker-compose*

examples/basic/docker-compose.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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

examples/same-pod/docker-compose.yaml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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:

0 commit comments

Comments
 (0)