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