Skip to content

Commit

Permalink
Merge pull request #223 from brianclinkenbeard/dockerize
Browse files Browse the repository at this point in the history
Add Dockerfile and docker-compose.yml for web
manuelernestog authored Feb 8, 2024
2 parents 6592805 + 6dc09ea commit 94d0a94
Showing 3 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.git
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:16-alpine
WORKDIR /app
COPY package.json /app
COPY yarn.lock /app
RUN yarn install --frozen-lockfile && yarn cache clean
COPY . /app
CMD yarn run serve
EXPOSE 8080
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: '3'
services:
app:
build: .
container_name: weektodo
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ".:/app"
- "node_modules:/app/node_modules"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s

volumes:
node_modules:

0 comments on commit 94d0a94

Please sign in to comment.