-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.yml
executable file
·117 lines (117 loc) · 3.18 KB
/
template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
apiVersion: v1
kind: Service
metadata:
name: docauposte-database-service
spec:
selector:
app: docauposte-database
ports:
- port: 3306
---
apiVersion: v1
kind: Pod
metadata:
name: docauposte-database-pod
labels:
app: docauposte-database
spec:
restartPolicy: Always
containers:
- name: database
image: docker.io/library/mariadb:latest
env:
- name: MARIADB_ROOT_PASSWORD_FILE
value: run/secrets/root_password
- name: MARIADB_DATABASE_FILE
value: run/secrets/database_name
- name: MARIADB_USER_FILE
value: run/secrets/database_user
- name: MARIADB_PASSWORD_FILE
value: run/secrets/database_password
ports:
- containerPort: 3306
volumeMounts :
- name: secrets
mountPath: /run/secrets
readOnly: true
- mountPath: /var/lib/mysql
name: database-data
dnsPolicy: Default
volumes:
- name: secrets
hostPath:
path: ./secrets
type: Directory
- hostPath:
path: ./database_data
type: DirectoryOrCreate
name: database-data
---
apiVersion: v1
kind: Pod
metadata:
name: docauposte-phpmyadmin-pod
labels:
app: docauposte-phpmyadmin
traefik.enable: true
traefik.http.routers.docauposte-phpmyadmin.rule: PathPrefix(`/dappma`)
traefik.http.routers.docauposte-phpmyadmin.entrypoints: web
traefik.http.routers.docauposte-phpmyadmin.middlewares: strip-docauposte-phpmyadmin-prefix
traefik.http.services.docauposte-phpmyadmin.loadbalancer.server.port: 80
traefik.http.middlewares.strip-docauposte-phpmyadmin-prefix.stripPrefix.prefixes: /dappma
spec:
restartPolicy: Always
containers:
- name: phpmyadmin
image: docker.io/phpmyadmin/phpmyadmin
env:
- name: PMA_HOST
value: database
- name: PMA_ABSOLUTE_URI
value: http://${HOSTNAME}/dappma/
volumeMounts:
- mountPath: /etc/phpmyadmin/config.user.inc.php
name: phpmyadmin-config
dnsPolicy: Default
volumes:
- hostPath:
path: ./config.user.inc.php
type: File
name: phpmyadmin-config
---
apiVersion: v1
kind: Pod
metadata:
name: docauposte-web-pod
labels:
app: docauposte-web
traefik.enable: true
traefik.http.routers.docauposte-web.rule: PathPrefix(`/docauposte`)
traefik.http.routers.docauposte-web.entrypoints: web
traefik.http.routers.docauposte-web.middlewares: strip-docauposte-web-prefix
traefik.http.services.docauposte-web.loadbalancer.server.port: 80
traefik.http.middlewares.strip-docauposte-web-prefix.stripPrefix.prefixes: /docauposte
spec:
restartPolicy: Always
containers:
- name: web
image: ghcr.io/${GITHUB_USER}/docauposte2:main
command: ["./${APP_CONTEXT}-entrypoint.sh"]
env:
- name: no_proxy
value: .ponet
- name: http_proxy
value: ${PROXY_ENV}
- name: APP_TIMEZONE
value: ${APP_TIMEZONE}
- name: https_proxy
value: ${PROXY_ENV}
volumeMounts:
- mountPath: /var/www
name: web-data
dnsPolicy: Default
volumes:
- hostPath:
path: ./
type: Directory
name: web-data