Skip to content

Commit

Permalink
Merge pull request #77 from gdsc-ncku/jason
Browse files Browse the repository at this point in the history
feat: containerize the app with docker
  • Loading branch information
jason810496 authored Feb 27, 2024
2 parents eddcd0a + af87154 commit 25ecb95
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Items that don't need to be in a Docker image.
# Anything not used by the build system should go here.
.git
.dockerignore
.gitignore
.github/*
README.md
Dockerfile

# Artifacts that will be built during image creation.
# This should contain all files created during `yarn build`.
dist
node_modules
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:lts-alpine

RUN mkdir /app
WORKDIR /app

COPY . /app
RUN npm install
RUN npm run build

# CMD [ "yarn","preview","--port","5173" ]
11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '1.0'

services:
frontend:
build: .
restart: always
command: ["yarn", "dev"]
ports:
- "5173:5173"
volumes:
- .:/app

0 comments on commit 25ecb95

Please sign in to comment.