Commit 2fbd71f2 authored by Markus Grigull's avatar Markus Grigull

Add automated react build to docker-compose

parent 560713e9
node_modules/
nginx/
doc/
build/
FROM node:latest
RUN mkdir /react
RUN mkdir /result
VOLUME /result
WORKDIR /react
CMD npm install && npm run build && cp -R /react/build/* /result/
version: "2"
services:
frontend:
webserver:
image: nginx:stable
volumes:
- ./nginx:/etc/nginx/conf.d/
- ./build:/www
- website-volume:/www
links:
- backend
ports:
- "80:80"
- "443:443"
restart: always
frontend:
build: .
volumes:
- ./:/react
- website-volume:/result
backend:
image: villasweb-backend
......@@ -18,8 +25,14 @@ services:
- database
environment:
- NODE_ENV=production
restart: always
database:
image: mongo:latest
# volumes:
# - /opt/database:/data/db
volumes:
- data-volume:/data/db
restart: always
volumes:
data-volume:
website-volume:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment