-
Notifications
You must be signed in to change notification settings - Fork 8
/
k8-deployment.yaml
70 lines (70 loc) · 1.46 KB
/
k8-deployment.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
61
62
63
64
65
66
67
68
69
70
apiVersion: apps/v1
kind: Deployment
metadata:
name: dna-admin
namespace: default
labels:
app: dna-admin
spec:
replicas: 1
selector:
matchLabels:
app: dna-admin
template:
metadata:
labels:
app: dna-admin
spec:
containers:
- name: dna-admin
image: dna-admin:0.1
imagePullPolicy: Always
env:
- name: DATABASE_URL
value: "postgres://postgres:c03213be9ab9014e@dna-db-entrypoint:5432/dna_admin_production"
- name: RAILS_ENV
value: "production"
- name: AWS_REGION_NAME
value: "us-west-1"
- name: AWS_BUCKET_NAME
value: "instinct-dna-dd"
# this won't be needed if using nginx
- name: RAILS_SERVE_STATIC_FILES
value: "1"
envFrom:
- secretRef:
name: aws-secrets
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dna-db
namespace: default
labels:
app: db
spec:
replicas: 1
selector:
matchLabels:
app: db
template:
metadata:
labels:
app: db
spec:
containers:
- name: dna-db
image: postgres:13
ports:
- containerPort: 5432
env:
- name: POSTGRES_PASSWORD
value: c03213be9ab9014e
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: db-data
volumes:
- name: db-data
hostPath:
# directory location on host
path: /data