Skip to content
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

Move item properties to handbook kv #355

Closed
wants to merge 95 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
c2dd876
Initial work towards VM deployment
thaddeus Jul 13, 2024
65213d3
Update SSH docker deploy via SSH
thaddeus Jul 14, 2024
4930d4a
Change ssh agent env
thaddeus Jul 14, 2024
d5de635
Update branch deploy to use ssh+docker deployments
thaddeus Jul 14, 2024
9b5d8fb
Skip reviews for development
thaddeus Jul 14, 2024
9fb2a14
Update test workflow
thaddeus Jul 14, 2024
cf9b441
Use proper node package script for test
thaddeus Jul 14, 2024
c62c8da
Update default development port
thaddeus Jul 14, 2024
d0e3891
Update newman collection to use development port
thaddeus Jul 14, 2024
133f8e2
Use secrets environment during test job
thaddeus Jul 14, 2024
c9dcb3f
Remove old production deployment
thaddeus Jul 14, 2024
5c0eb81
Update tag format for images
thaddeus Jul 14, 2024
068b3f3
Define image tag in deploy job
thaddeus Jul 14, 2024
a25eef9
Set tag variables explicitly
thaddeus Jul 14, 2024
c2996e4
Use proper namespace for GH PR number
thaddeus Jul 14, 2024
455909d
Remove typo from docker run
thaddeus Jul 14, 2024
3d4189d
Update HTTP README
thaddeus Jul 14, 2024
e880678
Update main deploy workflow
thaddeus Jul 14, 2024
4eb29b4
Merge pull request #2 from thaddeus/ssh-deploy
thaddeus Jul 14, 2024
7458550
Add checkout to main build job
thaddeus Jul 14, 2024
1ad247d
Test production deployment
thaddeus Jul 14, 2024
b4fdd0d
Merge pull request #3 from thaddeus/test-deploy
thaddeus Jul 14, 2024
fe921fa
Add Sentry instrumentation
thaddeus Jul 17, 2024
c455fbd
Use variables for Sentry sample rates during deployment
thaddeus Jul 17, 2024
7fb6692
Add environment to Sentry init
thaddeus Jul 17, 2024
9be813b
Use sha for Sentry release version
thaddeus Jul 17, 2024
ae46501
Update to Node 20
thaddeus Jul 17, 2024
347630a
Add explicit evironment flag
thaddeus Jul 17, 2024
ead258d
Add restart flag to docker run
thaddeus Jul 17, 2024
1924252
Add extra integration data to Sentry
thaddeus Jul 17, 2024
8cc1cd8
Manually set user
thaddeus Jul 17, 2024
eddacaa
Merge remote-tracking branch 'the-hideout/update-logging'
thaddeus Jul 18, 2024
43ec6b4
Use normal user for docker control
thaddeus Jul 18, 2024
7330155
Ignore resolve spans
thaddeus Jul 18, 2024
5cedf44
Merge branch 'main' into main
Razzmatazzz Jul 18, 2024
1f5b56c
Use cluster for serving
thaddeus Jul 19, 2024
d20a7b1
Merge remote-tracking branch 'the-hideout/graphql-yoga'
thaddeus Aug 8, 2024
9e88c24
Merge remote-tracking branch 'the-hideout/graphql-yoga'
thaddeus Aug 9, 2024
bb5ac7f
Merge pull request #6 from the-hideout/graphql-yoga
Razzmatazzz Aug 9, 2024
5933049
Merge branch 'main' into graphql-yoga
Razzmatazzz Aug 9, 2024
3cd68b6
Merge pull request #7 from the-hideout/graphql-yoga
Razzmatazzz Aug 9, 2024
d5fae03
Merge pull request #8 from the-hideout/graphql-yoga
Razzmatazzz Aug 10, 2024
39cdf89
Add cluster worker message instrumentation
thaddeus Aug 10, 2024
8ea269b
Merge pull request #9 from the-hideout/graphql-yoga
Razzmatazzz Aug 10, 2024
a12afba
Fix Sentry and add trace propagation
thaddeus Aug 10, 2024
260a1d1
Import Sentry to cache machine module
thaddeus Aug 10, 2024
5a6e07b
Use new API for trace propagation headers
thaddeus Aug 10, 2024
4277ca2
Remove broken trace propagation
thaddeus Aug 10, 2024
1624c4e
Merge pull request #10 from the-hideout/graphql-yoga
thaddeus Aug 11, 2024
0fe73a8
Revert "Don't use waitUntil"
thaddeus Aug 11, 2024
a351fca
Merge pull request #11 from thaddeus/revert-10-graphql-yoga
thaddeus Aug 11, 2024
3b53c53
Merge branch 'main' into graphql-yoga
Razzmatazzz Aug 12, 2024
ac2ad43
Merge pull request #12 from the-hideout/graphql-yoga
Razzmatazzz Aug 12, 2024
d4a4a52
Merge pull request #13 from the-hideout/graphql-yoga
Razzmatazzz Aug 14, 2024
8c17766
Merge branch 'sell-item-task' of https://github.com/the-hideout/tarko…
Razzmatazzz Aug 23, 2024
f646629
Merge pull request #15 from thaddeus/updates-from-worker
Razzmatazzz Aug 23, 2024
0094623
Merge branch 'sell-item-task' of https://github.com/the-hideout/tarko…
Razzmatazzz Aug 26, 2024
ea81a93
formatting
Razzmatazzz Aug 26, 2024
de395e9
fix package-lock
Razzmatazzz Aug 26, 2024
48de622
Merge pull request #16 from thaddeus/restart-workers
Razzmatazzz Aug 26, 2024
897b09d
Merge branch 'sell-item-task' of https://github.com/the-hideout/tarko…
Razzmatazzz Aug 27, 2024
63cbb60
Merge pull request #17 from thaddeus/pull-updates
Razzmatazzz Aug 27, 2024
60e2fda
Pull updates from worker repo
Razzmatazzz Aug 29, 2024
dc42fdc
Merge pull request #18 from thaddeus/fix-worker-messages
Razzmatazzz Aug 29, 2024
c45d271
Merge branch 'sell-item-task' of https://github.com/the-hideout/tarko…
Razzmatazzz Aug 29, 2024
50e040a
Merge pull request #19 from thaddeus/catch-worker-send-error
Razzmatazzz Aug 29, 2024
9b00189
Merge branch 'no-cache-errors' of https://github.com/the-hideout/tark…
Razzmatazzz Aug 29, 2024
5264cb8
Merge pull request #20 from thaddeus/no-cache-error
Razzmatazzz Aug 29, 2024
bf34985
Merge branch 'no-cache-errors' of https://github.com/the-hideout/tark…
Razzmatazzz Aug 30, 2024
dba36c3
Merge pull request #21 from thaddeus/fix-variable-args
Razzmatazzz Aug 30, 2024
aa4b361
Merge branch 'http-kv-queue' of https://github.com/the-hideout/tarkov…
Razzmatazzz Sep 10, 2024
3427be3
Merge pull request #22 from thaddeus/kv-request-queue
Razzmatazzz Sep 10, 2024
aae12f8
Merge pull request #23 from thaddeus/lite-api
Razzmatazzz Sep 18, 2024
d346a67
Merge pull request #24 from thaddeus/lite-api-fix
Razzmatazzz Sep 18, 2024
b80d9b4
Merge branch 'main' into endpoint-origin-passthrough
Razzmatazzz Sep 19, 2024
51fd268
Merge pull request #25 from thaddeus/endpoint-origin-passthrough
Razzmatazzz Sep 19, 2024
63e180f
Merge pull request #26 from thaddeus/upstream-pull
Razzmatazzz Sep 24, 2024
8d6f58c
Merge pull request #27 from thaddeus/artillery
Razzmatazzz Sep 26, 2024
52bef28
Merge pull request #28 from thaddeus/artillery
Razzmatazzz Sep 26, 2024
131a224
Merge pull request #29 from thaddeus/filter-historical-prices
Razzmatazzz Oct 11, 2024
f51bb27
Merge pull request #30 from thaddeus/task-available-delay
Razzmatazzz Oct 13, 2024
49b7bd5
Merge branch 'main' of https://github.com/the-hideout/tarkov-api into…
Razzmatazzz Nov 26, 2024
0a8b216
Merge pull request #32 from thaddeus/bump-branch
Razzmatazzz Nov 26, 2024
7308000
Merge branch 'item-by-normalizedname' of https://github.com/the-hideo…
Razzmatazzz Nov 29, 2024
21d1883
Merge pull request #33 from thaddeus/fix-item-by-normalizedname
Razzmatazzz Nov 29, 2024
9d84af2
Enable archived prices
Razzmatazzz Dec 16, 2024
5d2c2ed
Merge pull request #34 from thaddeus/enable-archived-prices
Razzmatazzz Dec 18, 2024
eee0095
split info into handbook kv
Razzmatazzz Jan 1, 2025
cdafbb9
Merge branch 'main' into handbook-kv
Razzmatazzz Jan 1, 2025
b512c78
update test
Razzmatazzz Jan 1, 2025
b2170df
Merge branch 'handbook-kv' of https://github.com/the-hideout/tarkov-a…
Razzmatazzz Jan 1, 2025
ed07a50
Merge branch 'handbook-kv' of https://github.com/the-hideout/tarkov-a…
Razzmatazzz Jan 1, 2025
ae1bad8
Merge pull request #35 from thaddeus/handbook-kv
Razzmatazzz Jan 1, 2025
2be6381
move item properties to handbook
Razzmatazzz Jan 3, 2025
a96fa11
Merge branch 'handbook-kv' of https://github.com/the-hideout/tarkov-a…
Razzmatazzz Jan 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 82 additions & 27 deletions .github/workflows/branch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@ on:
issue_comment:
types: [ created ]

# Permissions needed for reacting and adding comments for IssueOps commands

permissions:
# Permissions needed for reacting and adding comments for IssueOps commands
pull-requests: write
deployments: write
contents: write
checks: read
statuses: read
# Permissions needed for building and deploying docker images
packages: write
# contents: read
attestations: write
id-token: write

env:
# Environment variables used by docker build and push
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DEFAULT_PORT: 8788
IMAGE_TAG: ghcr.io/${{ github.repository }}:pr-${{ github.event.issue.number }}

jobs:
deploy:
Expand All @@ -19,41 +31,93 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: github/branch-deploy@v9
- uses: github/branch-deploy@v9.9.1
id: branch-deploy
with:
admins: the-hideout/core-contributors
admins_pat: ${{ secrets.BRANCH_DEPLOY_ADMINS_PAT }}
environment_targets: production,development
environment_urls: production|https://api.tarkov.dev/graphql,development|https://dev-api.tarkov.dev/graphql
sticky_locks: "true"
skip_reviews: "development"

- name: checkout
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/checkout@v4
with:
ref: ${{ steps.branch-deploy.outputs.sha }}
ref: ${{ steps.branch-deploy.outputs.ref }}

- name: setup node
- name: Log in to the Container registry
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/setup-node@v4
uses: docker/[email protected]
with:
node-version-file: .node-version
cache: npm
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
- name: Extract metadata (tags, labels) for Docker
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
run: npm ci
id: docker-meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Publish - Development
if: ${{ steps.branch-deploy.outputs.environment == 'development' &&
steps.branch-deploy.outputs.noop != 'true' &&
steps.branch-deploy.outputs.continue == 'true' }}
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # [email protected]
# In theory, we could build the container as soon as a commit is pushed, rather than waiting until just before deployment.
# This would make deployments faster, but it does mean we would have images in our repository that may not have been reviewed.
- name: Build and push Docker image to registry
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
id: docker-push
uses: docker/[email protected]
with:
wranglerVersion: '2.17.0'
apiToken: ${{ secrets.CF_API_TOKEN }}
environment: "development"
context: .
push: true
tags: ${{ env.IMAGE_TAG }}
labels: ${{ steps.docker-meta.outputs.labels }}

- name: Generate artifact attestation
if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.docker-push.outputs.digest }}
push-to-registry: true

# Setup SSH agent
- name: Setup Deployment Agent
if: ${{ steps.branch-deploy.outputs.continue == 'true' &&
steps.branch-deploy.outputs.noop != 'true' }}
id: setup-ssh
env:
# Sets up the ssh agent to be used in future steps for connecting to the deployment environment
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# Sets the ssh host address based on the desired environment if they differ, falling back to SSH_HOST
ENV_HOST: ${{ steps.branch-deploy.outputs.environment == 'production' && secrets.SSH_HOST_PROD || secrets.SSH_HOST_DEV || secrets.SSH_HOST }}
run: |
mkdir -p /home/runner/.ssh
ssh-keyscan $ENV_HOST >> /home/runner/.ssh/known_hosts
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /home/runner/.ssh/api-server-key
chmod 600 /home/runner/.ssh/api-server-key
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add /home/runner/.ssh/api-server-key
echo "ssh-host=$ENV_HOST" >> $GITHUB_OUTPUT

- name: Deploy
if: ${{ steps.branch-deploy.outputs.continue == 'true' &&
steps.branch-deploy.outputs.noop != 'true'}}
env:
# Uses the ssh agent set up in the previous step to connect to the deployment environment
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# Allows for the API to be deployed to the same system on different ports based on the environment
ENV_PORT: ${{ steps.branch-deploy.outputs.environment == 'production' && '80' || env.DEFAULT_PORT }}
# The name of the container to be run
CONTAINER_NAME: tarkov-api-${{ steps.branch-deploy.outputs.environment }}
run: |
# Stop and remove any existing container matching our container name variable
ssh ${{ secrets.SSH_USER }}@${{ steps.setup-ssh.outputs.ssh-host }} "docker rm -f ${{ env.CONTAINER_NAME }} || true"
# Pull the latest version of the image published to the registry
ssh ${{ secrets.SSH_USER }}@${{ steps.setup-ssh.outputs.ssh-host }} "docker pull ${{ env.IMAGE_TAG }}"
# Run the image as a container
ssh ${{ secrets.SSH_USER }}@${{ steps.setup-ssh.outputs.ssh-host }} "docker run -d --name ${{ env.CONTAINER_NAME }} --restart unless-stopped -p ${{ env.ENV_PORT }}:${{ env.DEFAULT_PORT }} -e ENVIRONMENT='${{ steps.branch-deploy.outputs.environment }}' -e SENTRY_ENV='${{ steps.branch-deploy.outputs.environment }}' -e SENTRY_DSN='${{ secrets.SENTRY_DSN || '' }}' -e SENTRY_TRACE_RATE=${{ vars.SENTRY_TRACE_RATE || 0 }} -e SENTRY_PROFILE_RATE=${{ vars.SENTRY_PROFILE_RATE || 0 }} -e DEPLOY_REF='${{ github.event.pull_request.head.sha || github.sha }}' -e CLOUDFLARE_TOKEN='${{ secrets.CLOUDFLARE_TOKEN }}' -e CACHE_BASIC_AUTH='${{ secrets.CACHE_BASIC_AUTH }}' ${{ env.IMAGE_TAG }}"

# Post comment on PR with development deploy info
- uses: GrantBirki/[email protected]
Expand All @@ -72,15 +136,6 @@ jobs:

> Pusher: @${{ github.actor }}, Action: `${{ github.event_name }}`, Workflow: `${{ github.workflow }}`;

- name: Publish - Production
if: ${{ steps.branch-deploy.outputs.continue == 'true' &&
steps.branch-deploy.outputs.noop != 'true' &&
steps.branch-deploy.outputs.environment == 'production' }}
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # [email protected]
with:
wranglerVersion: '2.17.0'
apiToken: ${{ secrets.CF_API_TOKEN }}

# Post comment on PR with production deploy info
- uses: GrantBirki/[email protected]
if: ${{ steps.branch-deploy.outputs.continue == 'true' &&
Expand Down
99 changes: 84 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,57 @@ on:

permissions:
contents: read
# Permissions needed for building and deploying docker images
packages: write
# contents: read
attestations: write
id-token: write

env:
# Environment variables used by docker build and push
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DEFAULT_PORT: 8788
IMAGE_LATEST_TAG: ghcr.io/${{ github.repository }}:latest
IMAGE_MAIN_TAG: ghcr.io/${{ github.repository }}:main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: docker-meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image to registry
id: docker-push
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ env.IMAGE_LATEST_TAG }},${{ env.IMAGE_MAIN_TAG }}
labels: ${{ steps.docker-meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.docker-push.outputs.digest }}
push-to-registry: true

deployment-check:
runs-on: ubuntu-latest
outputs: # set outputs for use in downstream jobs
Expand All @@ -17,33 +66,53 @@ jobs:
steps:
# https://github.com/github/branch-deploy/blob/d3c24bd92505e623615b75ffdfac5ed5259adbdb/docs/merge-commit-strategy.md
- name: deployment check
uses: github/branch-deploy@v9
uses: github/branch-deploy@v9.9.1
id: deployment-check
with:
merge_deploy_mode: "true"
environment: production

deploy:
if: ${{ needs.deployment-check.outputs.continue == 'true' }}
needs: deployment-check
needs:
- deployment-check
- build
environment: production
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- name: install dependencies
run: npm ci
# Setup SSH agent
- name: Setup Deployment Agent
id: setup-ssh
env:
# Sets up the ssh agent to be used in future steps for connecting to the deployment environment
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# Sets the ssh host address based on the desired environment if they differ, falling back to SSH_HOST
ENV_HOST: ${{ secrets.SSH_HOST_PROD || secrets.SSH_HOST }}
run: |
mkdir -p /home/runner/.ssh
ssh-keyscan $ENV_HOST >> /home/runner/.ssh/known_hosts
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /home/runner/.ssh/api-server-key
chmod 600 /home/runner/.ssh/api-server-key
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add /home/runner/.ssh/api-server-key
echo "ssh-host=$ENV_HOST" >> $GITHUB_OUTPUT

- name: Publish - Production
uses: cloudflare/wrangler-action@6d58852c35a27e6034745c5d0bc373d739014f7f # [email protected]
with:
wranglerVersion: '2.17.0'
apiToken: ${{ secrets.CF_API_TOKEN }}
- name: Deploy
env:
# Uses the ssh agent set up in the previous step to connect to the deployment environment
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# Allows for the API to be deployed to the same system on different ports based on the environment
ENV_PORT: '80'
# The name of the container to be run
CONTAINER_NAME: tarkov-api-production
run: |
# Stop and remove any existing container matching our container name variable
ssh ${{ secrets.SSH_USER }}@${{ steps.setup-ssh.outputs.ssh-host }} "docker rm -f ${{ env.CONTAINER_NAME }} || true"
# Pull the latest version of the image published to the registry
ssh ${{ secrets.SSH_USER }}@${{ steps.setup-ssh.outputs.ssh-host }} "docker pull ${{ env.IMAGE_MAIN_TAG }}"
# Run the image as a container
ssh ${{ secrets.SSH_USER }}@${{ steps.setup-ssh.outputs.ssh-host }} "docker run -d --name ${{ env.CONTAINER_NAME }} --restart unless-stopped -p ${{ env.ENV_PORT }}:${{ env.DEFAULT_PORT }} -e ENVIRONMENT='production' -e SENTRY_ENV='production' -e SENTRY_DSN='${{ secrets.SENTRY_DSN || '' }}' -e SENTRY_TRACE_RATE=${{ vars.SENTRY_TRACE_RATE || 0 }} -e SENTRY_PROFILE_RATE=${{ vars.SENTRY_PROFILE_RATE || 0 }} -e DEPLOY_REF='${{ github.sha }}' -e CLOUDFLARE_TOKEN='${{ secrets.CLOUDFLARE_TOKEN }}' -e CACHE_BASIC_AUTH='${{ secrets.CACHE_BASIC_AUTH }}' ${{ env.IMAGE_MAIN_TAG }}"
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,25 @@ permissions:

jobs:
test:
environment: secrets
runs-on: ubuntu-latest
steps:
- name: checkout
- name: Checkout
uses: actions/checkout@v4

- name: setup node
- name: Setup Node Environment
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

- run: npm ci
- name: Install Dependencies
run: |
npm ci
cd http && npm ci

- name: test
- name: Execute Tests
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CACHE_BASIC_AUTH: ${{ secrets.CACHE_BASIC_AUTH }}
run: script/test
2 changes: 1 addition & 1 deletion .github/workflows/unlock-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: unlock on merge
uses: github/branch-deploy@v9
uses: github/branch-deploy@v9.9.1
id: unlock-on-merge
with:
unlock_on_merge_mode: "true" # <-- indicates that this is the "Unlock on Merge Mode" workflow
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.11.0
20.15.1
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:20-slim

# Copy the files from the host to the container
COPY . /app

# Setup base package
WORKDIR /app
RUN npm ci

# Setup HTTP package
WORKDIR /app/http
RUN npm ci

ENV CLOUDFLARE_TOKEN=placeholder
ENV CACHE_BASIC_AUTH=placeholder
ENV PORT=8788
ENV ENVIRONMENT=dev
ENV SENTRY_DSN=
ENV SENTRY_TRACE_RATE=0
ENV SENTRY_PROFILE_RATE=0

EXPOSE $PORT

# Run the application
ENTRYPOINT ["npm", "run", "start"]
Loading
Loading