-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathweb-controller.yaml
60 lines (60 loc) · 1.4 KB
/
web-controller.yaml
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
apiVersion: v1
kind: ReplicationController
metadata:
name: www-v1
labels:
app: www
spec:
replicas: 2
selector:
app: www
version: v1
template:
metadata:
labels:
app: www
version: v1
spec:
volumes:
- name: web-assets
emptyDir: {}
- name: web-sock
emptyDir: {}
containers:
- name: web
image: gcr.io/foxio-rnd/rails-image:v1
ports:
- name: web-server
containerPort: 8080
env:
- name: RAILS_ENV
value: production
- name: WEB_DATABASE_HOST
value: db
- name: SECRET_KEY_BASE
value: 4fb2a451674dd7c5641577a0031847d82247bd137fedb0ba91c6d1a6ccbc8d2da370ffa164503f50c2f2c121f46f1f21b89dc946633924e0c464bdb69b368415
volumeMounts:
- mountPath: /assets
name: web-assets
- mountPath: /tmp
name: web-sock
lifecycle:
postStart:
exec:
command:
- /bin/bash
- -c
- /my_project/kubernetes-post-start.sh
- name: nginx
image: gcr.io/foxio-rnd/nginx-image:v1
ports:
- name: http-server
containerPort: 80
- name: https-server
containerPort: 443
volumeMounts:
- mountPath: /my_project/public
name: web-assets
readOnly: true
- mountPath: /tmp
name: web-sock