mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Fix various errors in deployment
Fix website volume Update backend submodule Remove unneeded open ports
This commit is contained in:
parent
3d4d8d105c
commit
34f1381133
4 changed files with 10 additions and 27 deletions
12
Dockerfile
12
Dockerfile
|
@ -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
|
||||
COPY . /usr/src/app
|
||||
RUN npm install && npm run build
|
||||
|
||||
VOLUME /usr/src/app/build
|
||||
|
||||
# Bundle app source
|
||||
COPY . /usr/src/app
|
||||
RUN npm run build
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
CMD [ "true" ]
|
||||
|
|
2
backend
2
backend
|
@ -1 +1 @@
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue