Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
radiance0718 committed Jun 3, 2024
2 parents 6d7b013 + 8056535 commit 9fbe189
Show file tree
Hide file tree
Showing 5 changed files with 12,439 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Docker image

on:
push:
branches: [main]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push Docker image for server
uses: docker/build-push-action@v5
with:
context: ./server
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/cs304-server:0.0.1

- name: Build and push Docker image for client
uses: docker/build-push-action@v2
with:
context: ./client
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/cs304-client:0.0.1
8 changes: 8 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:
with:
fetch-depth: 0

- name: Cache super-linter
uses: actions/cache@v2
with:
path: ~/.cache/super-linter
key: ${{ runner.os }}-super-linter-${{ hashFiles('.github/linters/**') }}
restore-keys: |
${{ runner.os }}-super-linter-
- name: Super-linter
uses: super-linter/[email protected]
env:
Expand Down
14 changes: 14 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm install -g pnpm
RUN pnpm install

COPY . .

EXPOSE 3000

CMD [ "pnpm", "start" ]
Loading

0 comments on commit 9fbe189

Please sign in to comment.