Skip to content

Commit

Permalink
Add docker frontend container
Browse files Browse the repository at this point in the history
  • Loading branch information
alefalezza committed Aug 2, 2022
1 parent b71b5d4 commit 8892c32
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
build
docs
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
l=true
legacy-peer-deps=true
14 changes: 14 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
version: "3.9"

services:
frontend:
build:
context: ./
dockerfile: ./docker/Dockerfile.frontend
args:
PUBLIC_URL: /
ports:
- 3000:3000
volumes:
- ./:/oh
depends_on:
- backend
networks:
- openhospital
backend:
build:
context: ./docker
Expand Down
15 changes: 15 additions & 0 deletions docker/Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:lts

ARG PUBLIC_URL

ENV NODE_ENV="docker"

VOLUME /oh

WORKDIR /oh/

COPY ../package*.json /oh/

RUN npm ci --legacy-peer-deps

CMD npm start

0 comments on commit 8892c32

Please sign in to comment.