Skip to content

Commit

Permalink
Merge branch 'main' into mntor-3378
Browse files Browse the repository at this point in the history
  • Loading branch information
codemist authored Nov 26, 2024
2 parents 578505b + 665fb50 commit 6c45a44
Show file tree
Hide file tree
Showing 5 changed files with 1,927 additions and 1,768 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/docker_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,23 @@ jobs:
run: |
echo "{\"commit\":\"$GITHUB_SHA\",\"version\":\"$GITHUB_REF\",\"source\":\"https://github.com/$GITHUB_REPOSITORY\",\"build\":\"$GITHUB_RUN_ID\"}" > version.json
- name: Check Docker Version
run: docker --version
- name: Install Latest Docker
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
- name: Build Docker image
env:
UPLOAD_SENTRY_SOURCEMAPS: true
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
docker build --tag blurts-server \
--build-arg SENTRY_RELEASE="$GITHUB_REF_NAME" \
--build-arg SENTRY_RELEASE="$SENTRY_RELEASE" \
--secret id=SENTRY_AUTH_TOKEN \
.
- name: Deploy to Dockerhub
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/docker_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ jobs:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Check Docker Version
run: docker --version

- name: Install Latest Docker
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
- name: Check out the repo
uses: actions/checkout@v4

- name: Build Docker image
run: docker build .

11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ ENV NEXT_PUBLIC_GA4_DEBUG_MODE=false
ARG S3_BUCKET
ENV S3_BUCKET=$S3_BUCKET

RUN GLEAN_PYTHON=python GLEAN_PIP=pip npm run build

ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=$SENTRY_RELEASE

ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ARG UPLOAD_SENTRY_SOURCEMAPS
ENV UPLOAD_SENTRY_SOURCEMAPS=$UPLOAD_SENTRY_SOURCEMAPS

RUN --mount=type=secret,id=SENTRY_AUTH_TOKEN,env=SENTRY_AUTH_TOKEN \
GLEAN_PYTHON=python \
GLEAN_PIP=pip \
npm run build

CMD ["npm", "start"]
Loading

0 comments on commit 6c45a44

Please sign in to comment.