diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..68155c427 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +build +docs \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..57ba283ec --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +l=true +legacy-peer-deps=true diff --git a/docker-compose.yaml b/docker-compose.yaml index be39d08c8..25bcddc44 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 diff --git a/docker/Dockerfile.frontend b/docker/Dockerfile.frontend new file mode 100644 index 000000000..0225225ce --- /dev/null +++ b/docker/Dockerfile.frontend @@ -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