Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Sep 17, 2024
1 parent d624258 commit 3d5658b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- staging

env:
DEPLOYMENT: ticket-office
DEPLOYMENT_NAMESPACE: ticket-office
Expand All @@ -21,18 +20,29 @@ jobs:
- name: 🔑 Login Docker
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
- name: Build client (Vite.js)
run: |
npm ci
cd client
npm run build --emptyOutDir --outDir '../server/public'
- name: Build server (Bun)
run: |
cd server
bun install
docker build -t ${{ github.repository }} .
IMAGE_ID=ghcr.io/${{ github.repository }}
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker tag ${{ github.repository }} $IMAGE_ID:staging
docker push $IMAGE_ID:staging
- name: Get Tag
id: version
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: 📦 Push Docker image
run: |
IMAGE_ID=ghcr.io/${{ github.repository }}
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
docker tag ${{ github.repository }} $IMAGE_ID:staging
docker push $IMAGE_ID:staging
deploy:
name: 💭 Update staging deployment
runs-on: ubuntu-latest
Expand All @@ -55,7 +65,7 @@ jobs:
steps:
- uses: dataesr/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN}}
mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
mattermost_channel: ${{ env.MM_NOTIFICATION_CHANNEL }}
deployment_url: ${{ env.DEPLOYMENT_URL }}
17 changes: 5 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
FROM oven/bun AS builder
FROM oven/bun

WORKDIR /app

COPY ./client/package.json ./client/
RUN cd client && npm ci

COPY ./client ./client
RUN cd client && npm run build --emptyOutDir --outDir '../server/public'

COPY ./server/package.json ./server/
COPY ./server/package.json .
RUN bun i --production
COPY ./server ./server
COPY ./server .

ENV NODE_ENV=production
CMD ["bun", "run", "index.ts"]

EXPOSE 3000

CMD ["bun", "run", "server/index.ts"]
EXPOSE 3000

0 comments on commit 3d5658b

Please sign in to comment.