Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
Add docker support (#26)
Browse files Browse the repository at this point in the history
* Add docker support

* Trigger actions
  • Loading branch information
dracco1993 authored Jun 20, 2020
1 parent 39247a8 commit e685e08
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# base image
FROM node:14

# set working directory
WORKDIR /app

EXPOSE 3000

# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH

# install and cache app dependencies
COPY package.json /app/package.json

ENTRYPOINT ["/app/docker-entry.sh"]
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: "3"

volumes:
pwa_node_modules:

services:
pwa:
build:
context: .
dockerfile: ./Dockerfile
tty: true
command: npm run dev
env_file:
- .env
ports:
- 3000:3000
volumes:
- ./:/app:delegated
- pwa_node_modules:/app/node_modules
6 changes: 6 additions & 0 deletions docker-entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e

npm install

exec "$@"

0 comments on commit e685e08

Please sign in to comment.