-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add :: dockerfile, CD * chore :: codeformat
- Loading branch information
Showing
3 changed files
with
36 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,4 @@ | ||
Dockerfile | ||
node_modules | ||
npm-debug.log | ||
dist |
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,22 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Login Docker | ||
env: | ||
DOCKER_USERNAME: ${{secrets.DOCKERHUB_USERNAME}} | ||
DOCKER_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}} | ||
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | ||
|
||
- name: Build Docker Image | ||
run: docker build -t jyk1029/emoting . | ||
|
||
- name: Push Docker Image | ||
run: docker push jyk1029/emoting:latest |
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:18-alpine | ||
|
||
WORKDIR /app | ||
ADD . /app/ | ||
|
||
RUN npm install | ||
RUN npm run build | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT npm run start |