Skip to content

Commit

Permalink
Merge pull request #88 from LCOGT/feature/argocd
Browse files Browse the repository at this point in the history
Add deployment manifests
  • Loading branch information
mgdaily authored Nov 19, 2024
2 parents 987b1a9 + 17919cd commit 94c318f
Show file tree
Hide file tree
Showing 31 changed files with 3,876 additions and 1,886 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
k8s
15 changes: 15 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Continuous Deployment"
on:
push:
branches:
- main
release:
types:
- published

jobs:
cd:
uses: LCOGT/reusable-workflows/.github/workflows/continuous-deployment.yaml@main
with:
secretsExposedToSkaffold: 'FONTAWESOME_PACKAGE_TOKEN,'
secrets: inherit
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
.devenv
.pre-commit-config.yaml

k8s/base/secrets.env
skaffold.env
local-kubeconfig
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:22
ARG FONTAWESOME_PACKAGE_TOKEN
WORKDIR /app
COPY package*.json ./
COPY .npmrc ./
RUN npm install
COPY ./ .
RUN npm run build
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,41 @@ npm run build
npm run lint
```

## Running this project locally via Kubernetes

This project includes kubernetes manifests that allow it to be deployed to a kubernetes cluster.

To run this project in a local kind cluster:

Drop into the nix environment that contains all of the relevant tools.
```
nix develop --impure
```

Create a cluster and container registry.
```
ctlptl apply -f local-cluster.yaml -f local-registry.yaml
```

Make sure you update the skaffold.env.changeme and k8s/base/secrets.env.changeme to include the fontawesome package token

```
mv skaffold.env.changeme skaffold.env
mv k8s/base/secrets.env.changeme k8s/base/secrets.env
```

Then edit these and insert the token.

Finally, to build and deploy the service to the cluster we just created:
```
skaffold -m app dev --port-forward
```

This starts the skaffold dev loop, which will rebuild the Docker image on code change, and will re-deploy the artifacts automatically.

The service will be available at http://localhost:8080


### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
=======
Expand Down
Loading

0 comments on commit 94c318f

Please sign in to comment.