86 lines
2.4 KiB
YAML
86 lines
2.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
io.kompose.service: app
|
|
name: app
|
|
spec:
|
|
replicas: 3
|
|
|
|
selector:
|
|
matchLabels:
|
|
io.kompose.service: app
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
io.kompose.service: app
|
|
spec:
|
|
restartPolicy: Always
|
|
containers:
|
|
- image: reg.cadoles.com/afornerot/nuosso
|
|
imagePullPolicy: Always
|
|
name: app-php-fpm
|
|
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
|
|
resources: {}
|
|
env:
|
|
- name: PHP_MEMORY_LIMIT
|
|
value: 128m
|
|
|
|
- name: PHP_FPM_LISTEN
|
|
value: 127.0.0.1:9000
|
|
- name: PHP_FPM_MEMORY_LIMIT
|
|
value: 128m
|
|
- name: PHP_FPM_LOG_LEVEL
|
|
value: warning
|
|
|
|
- name: POSTGRES_DATABASE_SERVICE_NAME
|
|
value: $(POSTGRES_DATABASE_SERVICE_NAME)-rw
|
|
- name: POSTGRES_DATABASE_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-user
|
|
key: username
|
|
- name: POSTGRES_DATABASE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-user
|
|
key: password
|
|
|
|
- name: APP_AUTH
|
|
value: "SQL"
|
|
- name: APP_MASTERIDENTITY
|
|
value: "SQL"
|
|
- name: DATABASE_URL
|
|
value: "postgresql://$(POSTGRES_DATABASE_USERNAME):$(POSTGRES_DATABASE_PASSWORD)@$(POSTGRES_DATABASE_SERVICE_NAME)-rw:5432/app"
|
|
- name: REDIS_HOST
|
|
value: rfs-$(REDIS_SERVICE_NAME)
|
|
- name: REDIS_PORT
|
|
value: "26379"
|
|
- name: REDIS_SERVICE
|
|
value: "mymaster"
|
|
|
|
lifecycle:
|
|
postStart:
|
|
exec:
|
|
command: ["/bin/sh", "-c", "/app/bin/console d:s:u --force --complete && /app/bin/console app:Init"]
|
|
|
|
- image: reg.cadoles.com/afornerot/nuosso
|
|
imagePullPolicy: Always
|
|
name: app-nginx
|
|
args: ["/usr/sbin/nginx"]
|
|
env:
|
|
- name: NGINX_APP_UPSTREAM_BACKEND_SERVER
|
|
value: 127.0.0.1:9000
|
|
- name: NGINX_APP_ROOT
|
|
value: "/public"
|
|
- name: NGINX_APP_PHP_INDEX
|
|
value: "/index.php"
|
|
- name: NGINX_ERROR_LOG_LEVEL
|
|
value: "warn"
|
|
- name: NGINX_APP_PHP_NON_FILE_PATTERN
|
|
value: "^/index\\.php(/|$)"
|
|
ports:
|
|
- containerPort: 8080
|
|
resources: {} |