· 5 years ago · Feb 18, 2021, 04:16 PM
1---
2apiVersion: apps/v1
3kind: Deployment
4metadata:
5 name: seat-app
6 namespace: test
7 labels:
8 game: eve
9 app: seat
10 role: app
11spec:
12 replicas: 1
13 selector:
14 matchLabels:
15 game: eve
16 app: seat
17 role: app
18 template:
19 metadata:
20 labels:
21 game: eve
22 app: seat
23 role: app
24 spec:
25 affinity:
26 podAntiAffinity:
27 requiredDuringSchedulingIgnoredDuringExecution:
28 - labelSelector:
29 matchExpressions:
30 - key: app
31 operator: In
32 values:
33 - seat
34 - key: role
35 operator: In
36 values:
37 - app
38 topologyKey: "kubernetes.io/hostname"
39 initContainers:
40 - name: init-seat-project
41 image: composer:1.8.6
42 imagePullPolicy: Always
43 args:
44 - create-project
45 - eveseat/seat
46 - /var/www/seat
47 - '--no-dev'
48 - '--ignore-platform-reqs'
49 volumeMounts:
50 - mountPath: /var/www/seat
51 name: seat-volume
52 securityContext:
53 privileged: false
54 # 82 is www-data to make possible to write in storage folder
55 runAsUser: 82
56 containers:
57 - name: seat-app
58 image: eveseat/eveseat-app:latest
59 imagePullPolicy: Always
60 volumeMounts:
61 - mountPath: /var/www/seat
62 name: seat-volume
63 resources:
64 limits:
65 ephemeral-storage: 1Gi
66 env:
67 ## DATABASE Configuration
68 - name: DB_HOST
69 value: "91.121.91.173"
70 - name: DB_PORT
71 value: "13306"
72 - name: DB_DATABASE
73 value: "seat"
74 - name: DB_USERNAME
75 value: "seat"
76 - name: DB_PASSWORD
77 valueFrom:
78 secretKeyRef:
79 name: seat-mysql
80 key: mysql-password
81 ## REDIS Configuration
82 - name: REDIS_HOST
83 value: "91.121.91.173"
84 - name: REDIS_PORT
85 value: "8050"
86 - name: REDIS_PASSWORD
87 valueFrom:
88 secretKeyRef:
89 name: seat-redis
90 key: redis-password
91 ## SeAT Configuration
92 - name: QUEUE_BALANCING_MODE
93 value: auto
94 - name: APP_DEBUG
95 value: "false"
96 - name: APP_URL
97 value: "http://seat.iceve.net"
98 - name: APP_ENV
99 value: local
100 - name: APP_KEY
101 valueFrom:
102 secretKeyRef:
103 name: seat-eve-api
104 key: app-key
105 # EVE API Configuration
106 - name: EVE_CLIENT_ID
107 valueFrom:
108 secretKeyRef:
109 name: seat-eve-api
110 key: eve-client-id
111 - name: EVE_CLIENT_SECRET
112 valueFrom:
113 secretKeyRef:
114 name: seat-eve-api
115 key: eve-client-secret
116 - name: EVE_CALLBACK_URL
117 value: "$(APP_URL)/auth/eve/callback"
118 - name: MAIL_DRIVER
119 value: "smtp"
120 - name: MAIL_HOST
121 value: "smtp.mailtrap.io"
122 - name: MAIL_PORT
123 value: "2525"
124 - name: MAIL_USERNAME
125 value: "null"
126 - name: MAIL_PASSWORD
127 value: "null"
128 - name: MAIL_ENCRYPTION
129 value: "null"
130 - name: MAIL_FROM_ADDRESS
131 value: "noreply@localhost.local"
132 - name: MAIL_FROM_NAME
133 value: "SeAT Administrator"
134 - name: SEAT_PLUGINS
135 value: ""
136 restartPolicy: Always
137 dnsPolicy: Default
138 volumes:
139 - name: seat-volume
140 emptyDir: {}
141