-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cdfff7b
Showing
62 changed files
with
7,765 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Build and Release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
packages: write | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build image | ||
runs-on: ubuntu-latest | ||
outputs: | ||
meta-tag: ${{ steps.meta.outputs.tags }} | ||
steps: | ||
- id: repository_string | ||
uses: ASzc/change-string-case-action@v6 | ||
with: | ||
string: ${{ github.repository }} | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Log in to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ env.REGISTRY }}/${{ steps.repository_string.outputs.lowercase }}:${{ github.sha }} | ||
build-args: | | ||
OTEL_OPTS= | ||
release-production: | ||
name: Release Production | ||
environment: prod | ||
needs: [build-and-push] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
steps: | ||
- id: repository_string | ||
uses: ASzc/change-string-case-action@v6 | ||
with: | ||
string: ${{ github.repository }} | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: cschleiden/replace-tokens@v1 | ||
name: Replace tokens in manifest | ||
with: | ||
files: "./k8s/manifest.yml" | ||
env: | ||
Namespace: remote-falcon | ||
Application: remote-falcon-control-panel | ||
Version: ${{ github.sha }} | ||
Env: prod | ||
Replicas: 2 | ||
Image: ${{ env.REGISTRY }}/${{ steps.repository_string.outputs.lowercase }}:${{ github.sha }} | ||
Requests.Memory: 2000Mi | ||
Requests.CPU: 500m | ||
Limits.Memory: 2250Mi | ||
Limits.CPU: 750m | ||
Host: remotefalcon.com | ||
|
||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 9badee22-1583-464e-8117-a7090179f151 | ||
|
||
- name: Kubectl apply | ||
run: kubectl apply -f ./k8s/manifest.yml | ||
|
||
- name: Kubectl rollout monitor | ||
run: kubectl rollout status deployment remote-falcon-control-panel --namespace remote-falcon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.DS_STORE | ||
node_modules | ||
scripts/flow/*/.flowconfig | ||
*~ | ||
*.pyc | ||
.grunt | ||
_SpecRunner.html | ||
__benchmarks__ | ||
build/ | ||
remote-repo/ | ||
coverage/ | ||
.module-cache | ||
fixtures/dom/public/react-dom.js | ||
fixtures/dom/public/react.js | ||
test/the-files-to-test.generated.js | ||
*.log* | ||
chrome-user-data | ||
*.sublime-project | ||
*.sublime-workspace | ||
.idea | ||
*.iml | ||
.vscode | ||
*.swp | ||
*.swo | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
development.env | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.env | ||
/target | ||
.qodana | ||
/.fleet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM maven:3-openjdk-17-slim AS build | ||
COPY src /usr/src/app/src | ||
COPY pom.xml /usr/src/app | ||
RUN mvn -f /usr/src/app/pom.xml clean package | ||
|
||
FROM openjdk:17-oracle | ||
COPY --from=build /usr/src/app/target/remote-falcon-control-panel.jar /usr/app/remote-falcon-control-panel.jar | ||
EXPOSE 8080 | ||
|
||
ARG OTEL_OPTS | ||
ENV OTEL_OPTS=${OTEL_OPTS} | ||
|
||
ADD 'https://dtdg.co/latest-java-tracer' /usr/app/dd-java-agent.jar | ||
|
||
ENTRYPOINT exec java $JAVA_OPTS $OTEL_OPTS -XX:FlightRecorderOptions=stackdepth=256 -XX:MaxRAMPercentage=75.0 -jar /usr/app/remote-falcon-control-panel.jar |
Oops, something went wrong.