-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from gdsc-ncku/jason
feat: containerize the app with docker
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |