Commit 34f13811 authored by Markus Grigull's avatar Markus Grigull

Fix various errors in deployment

Fix website volume
Update backend submodule
Remove unneeded open ports
parent 3d4d8d10
......@@ -5,15 +5,9 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json /usr/src/app/
RUN npm install
VOLUME /usr/src/app/build
# Bundle app source
COPY . /usr/src/app
RUN npm run build
RUN npm install && npm run build
EXPOSE 80
VOLUME /usr/src/app/build
CMD [ "npm", "start" ]
CMD [ "true" ]
Subproject commit 22e594a848798a79f0ab90e6e0a6ff2fe3d91e8b
Subproject commit c3bbf18279b892374c8998a455d57ec8acc92501
......@@ -3,9 +3,7 @@ version: "2"
volumes:
database:
driver: local
networks:
villas:
website:
services:
# Build the frontend with node into a Docker volume
......@@ -14,7 +12,8 @@ services:
frontend:
build:
context: .
command: "/bin/true"
volumes:
- website:/usr/src/app/build
nginx:
build:
......@@ -23,10 +22,8 @@ services:
ports:
- "80:80"
- "443:443"
volumes_from:
- frontend
networks:
villas:
volumes:
- website:/www
# The VILLASweb backend
backend:
......@@ -34,8 +31,6 @@ services:
environment:
- NODE_ENV=production
restart: always
networks:
villas:
# The MongoDB database for the VILLASweb backend
database:
......@@ -43,12 +38,8 @@ services:
user: mongodb
volumes:
- database:/data/db
expose:
- "27017"
restart: always
user: mongodb
networks:
villas:
# AMQP broker for VILLAScontroller
# broker:
......@@ -70,5 +61,3 @@ services:
privileged: true
restart: always
command: node /etc/villas/node/websocket-demo.conf
networks:
villas:
......@@ -27,7 +27,7 @@ server {
# frontend location
location / {
root /usr/src/app/build/;
root /www;
}
# error pages
......
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