Skip to content
Snippets Groups Projects
Commit ce8caeeb authored by Steve Reis's avatar Steve Reis
Browse files

feat: Add secret JWT token to Gitlab CI

parent b08c38c0
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ build: ...@@ -22,7 +22,7 @@ build:
# This matches pre-releases # This matches pre-releases
- /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/ - /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
script: script:
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:pipeline-$CI_PIPELINE_ID ./api - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH:pipeline-$CI_PIPELINE_ID ./api --build-arg JWT_SECRET=$JWT_SECRET
- docker push $CI_REGISTRY/$CI_PROJECT_PATH:pipeline-$CI_PIPELINE_ID - docker push $CI_REGISTRY/$CI_PROJECT_PATH:pipeline-$CI_PIPELINE_ID
release: release:
......
...@@ -30,4 +30,7 @@ COPY . . ...@@ -30,4 +30,7 @@ COPY . .
COPY --from=development /usr/src/app/dist ./dist COPY --from=development /usr/src/app/dist ./dist
COPY --from=development /usr/src/app/assets ./assets COPY --from=development /usr/src/app/assets ./assets
ARG JWT_SECRET
ENV AUTH_JWT_SECRET=${JWT_SECRET:-DefaultSecretNotToBeUse}
CMD ["node", "dist/main"] CMD ["node", "dist/main"]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment