Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shiling committed Jul 26, 2023
2 parents b2a3d63 + c81a0c3 commit a7623a5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-build.yml
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)
21 changes: 21 additions & 0 deletions Dockerfile
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"]

0 comments on commit a7623a5

Please sign in to comment.