-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/shiling/testing-zero-to-hero
- Loading branch information
Showing
2 changed files
with
39 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,18 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag testing-zero-to-hero-pokedex:$(date +%s) |
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,21 @@ | ||
FROM node:18 | ||
|
||
# Create app directory | ||
RUN mkdir -p /workspace/ | ||
WORKDIR /workspace/ | ||
|
||
# Install app dependencies | ||
COPY package*.json ./ | ||
RUN npm install | ||
|
||
# If you are building your code for production | ||
# RUN npm ci --omit=dev | ||
|
||
# Bundle app source | ||
COPY . . | ||
|
||
# Expose port 3000 | ||
EXPOSE 3000 | ||
|
||
# Run the server program | ||
CMD ["npm", "run", "start"] |