File tree Expand file tree Collapse file tree 4 files changed +73
-1
lines changed Expand file tree Collapse file tree 4 files changed +73
-1
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : frontend
5
+ spec :
6
+ ports :
7
+ - protocol : TCP
8
+ port : 80
9
+ targetPort : 80
10
+ selector :
11
+ app : mealplan
12
+ tier : frontend
13
+ type : LoadBalancer
14
+ ---
15
+ apiVersion : extensions/v1beta1
16
+ kind : Deployment
17
+ metadata :
18
+ name : frontend
19
+ spec :
20
+ template :
21
+ metadata :
22
+ labels :
23
+ app : mealplan
24
+ tier : frontend
25
+ spec :
26
+ containers :
27
+ - image : " coderjourney/mealplan-frontend:1.0.0"
28
+ name : nginx
29
+ lifecycle :
30
+ preStop :
31
+ exec :
32
+ command : ["/usr/sbin/nginx","-s","quit"]
Original file line number Diff line number Diff line change 37
37
name : postgres
38
38
volumeMounts :
39
39
- name : postgres-storage
40
- mountPath : /var/lib/postgresql/db- data
40
+ mountPath : /var/lib/postgresql/data
41
41
volumes :
42
42
- name : postgres-storage
43
43
persistentVolumeClaim :
53
53
resources :
54
54
requests :
55
55
storage : 5Gi
56
+ volumeName : postgres-pv
57
+ ---
58
+ apiVersion : v1
59
+ kind : PersistentVolume
60
+ metadata :
61
+ name : postgres-pv
62
+ spec :
63
+ accessModes :
64
+ - ReadWriteOnce
65
+ capacity :
66
+ storage : 5Gi
67
+ hostPath :
68
+ path : /data/mealplan-postgres
Original file line number Diff line number Diff line change
1
+ FROM nginx:1.11.13-alpine
2
+
3
+ COPY site.conf /etc/nginx/conf.d/default.conf
Original file line number Diff line number Diff line change
1
+ upstream mealplan {
2
+ server mealplan;
3
+ }
4
+
5
+ server {
6
+ listen 80;
7
+
8
+ # Properly server assets
9
+ location ~ ^/(assets)/ {
10
+ root /usr/share/nginx/html;
11
+ gzip_static on;
12
+ expires max;
13
+ add_header Cache-Control public;
14
+ add_header ETag "";
15
+ }
16
+
17
+ # Proxy request to rails app
18
+ location / {
19
+ proxy_set_header Host $host;
20
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21
+ proxy_pass_header Set-Cookie;
22
+ proxy_pass http://mealplan;
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments