fix lecoffre-front
This commit is contained in:
parent
624aab70a5
commit
11db34a814
@ -21,8 +21,8 @@ jobs:
|
||||
version: 20.10.12
|
||||
docker_layer_caching: true
|
||||
- run: docker login rg.fr-par.scw.cloud/lecoffre -u nologin -p $SCW_SECRET_KEY
|
||||
- run: docker build --tag rg.fr-par.scw.cloud/lecoffre/front:$TAG .
|
||||
- run: docker push rg.fr-par.scw.cloud/lecoffre/front:$TAG
|
||||
- run: docker build --tag rg.fr-par.scw.cloud/lecoffre/front:${CIRCLE_SHA1:0:7} .
|
||||
- run: docker push rg.fr-par.scw.cloud/lecoffre/front:${CIRCLE_SHA1:0:7}
|
||||
|
||||
|
||||
deploy-docker-image:
|
||||
@ -46,22 +46,17 @@ jobs:
|
||||
lecoffre-front devops/ -i -f devops/<<parameters.env>>.values.yaml
|
||||
-n lecoffre-<<parameters.env>>
|
||||
--create-namespace
|
||||
--set lecoffrefront.image.repository='rg.fr-par.scw.cloud/lecoffre/front'
|
||||
--set lecoffrefront.image.tag=$TAG
|
||||
--set lecoffreBack.image.repository='rg.fr-par.scw.cloud/lecoffre/front'
|
||||
--set lecoffreBack.image.tag=${CIRCLE_SHA1:0:7}
|
||||
|
||||
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-and-register-stg:
|
||||
when:
|
||||
and:
|
||||
- equal: [ staging, << pipeline.git.branch >> ]
|
||||
- << pipeline.git.tag >>
|
||||
jobs:
|
||||
- build-push-docker-image:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
only: staging
|
||||
- deploy-docker-image:
|
||||
@ -71,21 +66,13 @@ workflows:
|
||||
context:
|
||||
- sc-shared-prd
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
only: staging
|
||||
|
||||
build-and-register-ppd:
|
||||
when:
|
||||
and:
|
||||
- equal: [ preprod, << pipeline.git.branch >> ]
|
||||
- << pipeline.git.tag >>
|
||||
jobs:
|
||||
- build-push-docker-image:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
only: preprod
|
||||
- deploy-docker-image:
|
||||
@ -95,21 +82,13 @@ workflows:
|
||||
context:
|
||||
- sc-shared-prd
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
only: preprod
|
||||
|
||||
build-and-register-prd:
|
||||
when:
|
||||
and:
|
||||
- equal: [ main, << pipeline.git.branch >> ]
|
||||
- << pipeline.git.tag >>
|
||||
jobs:
|
||||
- build-push-docker-image:
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
only: main
|
||||
- deploy-docker-image:
|
||||
@ -119,8 +98,6 @@ workflows:
|
||||
context:
|
||||
- sc-shared-prd
|
||||
filters:
|
||||
tags:
|
||||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
only: main
|
||||
|
||||
|
@ -4,7 +4,7 @@ scwSecretKey: AgCgjF5QEzxT3GYTS5B6cmQ0e+0/qFWzKaUDSi+Vjc7RoameuvaIJvTXMBkS3he1oy
|
||||
|
||||
lecoffreFront:
|
||||
serviceAccountName: lecoffre-front-sa
|
||||
command: "npm run api:start"
|
||||
command: "'sh', '-c', 'export $(xargs </etc/env/.env) && npm run cron'"
|
||||
envSecrets: front-env-ppd
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
@ -18,14 +18,17 @@ lecoffreFront:
|
||||
limits:
|
||||
memory: 2Gi
|
||||
ingress:
|
||||
host: app.stg.lecoffre.smart-chain.fr
|
||||
host: app.ppd.lecoffre.smart-chain.fr
|
||||
tls:
|
||||
hosts:
|
||||
- app.stg.lecoffre.smart-chain.fr
|
||||
- app.ppd.lecoffre.smart-chain.fr
|
||||
secretName: api-tls
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
env:
|
||||
- key: .env
|
||||
scwID: "id:a131edea-84e0-49d6-b4a8-20ab417220c9"
|
||||
|
||||
|
@ -4,7 +4,7 @@ scwSecretKey: AgBG2y7uQuap+2akNPGFxpCR+l0INO6Wxez5qljtY6t71GFGhJLYN9ZfefflKcFzD2
|
||||
|
||||
lecoffreFront:
|
||||
serviceAccountName: lecoffre-front-sa
|
||||
command: "npm run api:start"
|
||||
command: "'sh', '-c', 'export $(xargs </etc/env/.env) && npm run cron'"
|
||||
envSecrets: front-env-prd
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
@ -18,14 +18,17 @@ lecoffreFront:
|
||||
limits:
|
||||
memory: 2Gi
|
||||
ingress:
|
||||
host: lecoffre.smart-chain.fr
|
||||
host: app.lecoffre.smart-chain.fr
|
||||
tls:
|
||||
hosts:
|
||||
- lecoffre.smart-chain.fr
|
||||
- app.lecoffre.smart-chain.fr
|
||||
secretName: api-tls
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
env:
|
||||
- key: .env
|
||||
scwID: "id:a131edea-84e0-49d6-b4a8-20ab417220c9"
|
||||
|
||||
|
@ -5,7 +5,7 @@ scwSecretKey: AgChoEnPitXp4Ny/rVMEcevaWKNVpyj2cJYAcq+yFqKwVwnLB+ffDvwqz9XBHu+6d4
|
||||
lecoffreFront:
|
||||
serviceAccountName: lecoffre-front-sa
|
||||
envSecrets: front-env-stg
|
||||
command: "npm run api:start"
|
||||
command: "'sh', '-c', 'export $(xargs </etc/env/.env) && npm run start'"
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
image:
|
||||
@ -18,10 +18,10 @@ lecoffreFront:
|
||||
limits:
|
||||
memory: 2Gi
|
||||
ingress:
|
||||
host: app.ppd.lecoffre.smart-chain.fr
|
||||
host: app.stg.lecoffre.smart-chain.fr
|
||||
tls:
|
||||
hosts:
|
||||
- app.ppd.lecoffre.smart-chain.fr
|
||||
- app.stg.lecoffre.smart-chain.fr
|
||||
secretName: api-tls
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
@ -30,9 +30,7 @@ lecoffreFront:
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
# key is name of the environment variable, scwID is the secret ID in SCW with "id:" in front
|
||||
env:
|
||||
- key: env1
|
||||
- key: .env
|
||||
scwID: "id:a131edea-84e0-49d6-b4a8-20ab417220c9"
|
||||
- key: env2
|
||||
scwID: "id:f396cfed-098f-4f75-8e5e-92ba60b46cee"
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@ spec:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
frontend:
|
||||
backend:
|
||||
service:
|
||||
name: lecoffre-front-svc
|
||||
port:
|
||||
@ -65,6 +65,10 @@ spec:
|
||||
{{end}}
|
||||
imagePullPolicy: {{ .Values.lecoffreFront.image.pullPolicy }}
|
||||
command: [{{ .Values.lecoffreFront.command }}]
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ .Values.lecoffreFront.envSecrets }}
|
||||
volumeMounts:
|
||||
- name: secret-volume
|
||||
mountPath: /etc/env
|
||||
volumes:
|
||||
- name: secret-volume
|
||||
secret:
|
||||
secretName: {{ .Values.lecoffreFront.envSecrets }}
|
Loading…
x
Reference in New Issue
Block a user