-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deployment manifests #88
base: main
Are you sure you want to change the base?
Conversation
TODO: Update readme for skaffold deploy/env
…orm into feature/argocd
cd: | ||
uses: LCOGT/reusable-workflows/.github/workflows/continuous-deployment.yaml@main | ||
with: | ||
secretsExposedToSkaffold: 'FONTAWESOME_PACKAGE_TOKEN,' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows us to send the package token to skaffold, which is used in the reusable workflow to build the docker image.
"targetNameUrl": "https://simbad2k.lco.global/", | ||
"configdbUrl": "http://configdb.lco.gtn/", | ||
"demo": false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We mount this to /config/config.json
as a ConfigMap in the deployment
artifacts: | ||
- image: lco-education-platform | ||
custom: | ||
buildCommand: skaffold-builder-buildx --build-arg FONTAWESOME_PACKAGE_TOKEN=${FONTAWESOME_PACKAGE_TOKEN} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can pass the package token as a docker build arg this way!
command: | ||
- "sh" | ||
- "-c" | ||
- "cp -r /app/dist/* /app/volume" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We updated this to simply copy the already built prod files from the docker image to a shared volume on the pod so that the static web server container could serve them. It felt wasteful to always build the app if a new pod is spun up.
- --health | ||
- --port=8080 | ||
- --host=0.0.0.0 | ||
- --page-fallback=/app/dist/index.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This --page-fallback
is necessary to force the static server to rely on the vue router (by routing to index.html) to route the browser. See https://static-web-server.net/features/error-pages/ for more details. Without it, when navigating to anything other than the root page, the server assumes it should serve /app/dist + /url/path
(where /url/path is the path entered e.g. /dashboard) which results in a 404, since the views aren't organized in the directories exactly matching the paths.
I have a feeling that most of our frontend apps will need this config.
This PR adds the deployment manifests for this project. These were created in line with the "Deploy Applications with ArgoCD" guide.