-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into DEV-349_forreal
# Conflicts: # src/app/pages/server-details/server-details.component.ts
- Loading branch information
Showing
46 changed files
with
3,386 additions
and
154 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,65 @@ | ||
name: Build and publish sc-www image for prod | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Inject legal docs | ||
env: | ||
LEGAL_TOKEN: ${{ secrets.LEGAL_TOKEN }} | ||
LEGAL_URL: ${{ secrets.LEGAL_URL }} | ||
run: 'curl -s -L -H "Authorization: token ${LEGAL_TOKEN}" ${LEGAL_URL} | tar xz --strip-components=1' | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-central-1 | ||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@v2 | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
file: Dockerfile | ||
context: . | ||
push: true | ||
tags: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPO_NAME }}:latest | ||
build-args: | | ||
POSTHOG_KEY=${{ secrets.POSTHOG_KEY }} | ||
POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} | ||
SENTRY_DSN=${{ secrets.SENTRY_DSN }} | ||
SENTRY_ENVIRONMENT=production | ||
SENTRY_ORG=${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT=${{ secrets.SENTRY_PROJECT }} | ||
SENTRY_URL=${{ secrets.SENTRY_URL }} | ||
SENTRY_RELEASE=${{ env.GITHUB_SHA }} | ||
SENTRY_TRACE_SAMPLE_RATE=1 | ||
SENTRY_PROFILE_SAMPLE_RATE=1 | ||
- name: Create Sentry release | ||
uses: getsentry/action-release@v1 | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | ||
SENTRY_URL: ${{ secrets.SENTRY_URL }} | ||
with: | ||
environment: production | ||
ignore_missing: true | ||
|
||
- name: Redeploy ECS service | ||
env: | ||
CLUSTER: ${{ secrets.ECS_CLUSTER }} | ||
SERVICE: ${{ secrets.ECS_SERVICE }} | ||
REGION: eu-central-1 | ||
run: | | ||
aws ecs update-service --cluster $CLUSTER --service $SERVICE --force-new-deployment --region $REGION |
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,44 @@ | ||
FROM public.ecr.aws/docker/library/node:lts-iron AS build | ||
|
||
ARG BACKEND_BASE_URI=https://keeper.sparecores.net | ||
ENV NG_APP_BACKEND_BASE_URI=$BACKEND_BASE_URI | ||
ARG BACKEND_BASE_URI_SSR=https://keeper.sparecores.net | ||
ENV NG_APP_BACKEND_BASE_URI_SSR=$BACKEND_BASE_URI_SSR | ||
|
||
ARG POSTHOG_KEY | ||
ENV NG_APP_POSTHOG_KEY=$POSTHOG_KEY | ||
ARG POSTHOG_HOST | ||
ENV NG_APP_POSTHOG_HOST=$POSTHOG_HOST | ||
|
||
ARG SENTRY_ORG | ||
ENV SENTRY_ORG=$SENTRY_ORG | ||
ARG SENTRY_PROJECT | ||
ENV SENTRY_PROJECT=$SENTRY_PROJECT | ||
ARG SENTRY_URL | ||
ENV SENTRY_URL=$SENTRY_URL | ||
|
||
ARG SENTRY_DSN | ||
ENV NG_APP_SENTRY_DSN=$SENTRY_DSN | ||
ARG SENTRY_TRACE_SAMPLE_RATE=0 | ||
ENV NG_APP_SENTRY_TRACE_SAMPLE_RATE=$SENTRY_TRACE_SAMPLE_RATE | ||
ARG SENTRY_PROFILE_SAMPLE_RATE=0 | ||
ENV NG_APP_SENTRY_PROFILE_SAMPLE_RATE=$SENTRY_PROFILE_SAMPLE_RATE | ||
ARG SENTRY_ENVIRONMENT=development | ||
ENV NG_APP_SENTRY_ENVIRONMENT=$SENTRY_ENVIRONMENT | ||
ARG SENTRY_RELEASE | ||
ENV NG_APP_SENTRY_RELEASE=$SENTRY_RELEASE | ||
|
||
WORKDIR /usr/src/app | ||
COPY package*.json ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build \ | ||
--mount=type=secret,id=aws-key-id,env=AWS_ACCESS_KEY_ID | ||
|
||
FROM public.ecr.aws/docker/library/node:lts-iron | ||
COPY package*.json ./ | ||
RUN npm install --omit=dev --no-audit | ||
COPY --from=build /usr/src/app/dist/sc-www/server /usr/share/www | ||
COPY --from=build /usr/src/app/dist/sc-www/browser /usr/share/www/static | ||
EXPOSE 3000 | ||
CMD ["node", "/usr/share/www/server.mjs"] |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.