Skip to content

Commit

Permalink
Fixed vis dependancy issues
Browse files Browse the repository at this point in the history
* Update readme (#45)

* Change vis-data and vis-network versions

* Fix react hot reloading (#47)

* Separate dev and prod dockerfile

* Separate dev and prod nginx configs

* Use new dev and prod nginx images

* Bump version

* Use arrays instead of vis datasets

* Remove vis-dataset
  • Loading branch information
madpeh authored Dec 27, 2022
1 parent 2938db2 commit 35cbc56
Show file tree
Hide file tree
Showing 12 changed files with 6,640 additions and 3,106 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Other applications are:
- [Simulation Run Environment](https://github.com/agent-base-information-flow-simulation/simulation-run-environment) - scalable run environment for Agents Assembly.
- [Communication Server](https://github.com/agent-based-information-flow-simulation/communication-server) - cluster of servers used for XMPP communication.
- [Agents Assembly Translator](https://github.com/agent-based-information-flow-simulation/agents-assembly-translator) - translator for Agents Assembly code.
- [Local Development Environment](https://github.com/agent-based-information-flow-simulation/local-development-environment) - simple environment for running agent-based simulations.

![aasm_vis](.readme-images/ui_vis_tab_example.png)

Expand Down
4 changes: 3 additions & 1 deletion docker-compose.dev.swarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ services:
- ./user-interface/src:/app/src

proxy:
build: ./proxy
build:
context: ./proxy
dockerfile: Dockerfile.dev
image: 127.0.0.1:5000/li-proxy
ports:
- "80:80"
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.swarm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ services:
- user-interface-data:/app/node_modules

proxy:
build: ./proxy
build:
context: ./proxy
dockerfile: Dockerfile.prod
image: "madpeh/li-proxy:${VERSION}"
ports:
- "80:80"
Expand Down
4 changes: 0 additions & 4 deletions proxy/Dockerfile

This file was deleted.

4 changes: 4 additions & 0 deletions proxy/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:1.23.3-alpine-slim
RUN rm /usr/share/nginx/html/*
COPY ./nginx.conf.dev /etc/nginx/nginx.conf
CMD [ "nginx", "-g", "daemon off;" ]
4 changes: 4 additions & 0 deletions proxy/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:1.23.3-alpine-slim
RUN rm /usr/share/nginx/html/*
COPY ./nginx.conf.prod /etc/nginx/nginx.conf
CMD [ "nginx", "-g", "daemon off;" ]
43 changes: 43 additions & 0 deletions proxy/nginx.conf.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
events {}

http {
gzip on;
gzip_types text/plain application/json;
gzip_min_length 250;

proxy_read_timeout 1h;
proxy_connect_timeout 1h;
proxy_send_timeout 1h;

server {
listen 80;
resolver 127.0.0.11 ipv6=off valid=5s;

location /api {
set $sre_entrypoint http://sre_entrypoint:80;
rewrite /api/(.*) /$1 break;
proxy_pass $sre_entrypoint;
}

location /ws {
proxy_pass http://li_user-interface:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

location / {
set $user_interface http://li_user-interface:80;
proxy_pass $user_interface;
}
}
}

stream {
server {
listen 7687;
resolver 127.0.0.11 ipv6=off valid=5s;
set $sre_entrypoint sre_entrypoint:7687;
proxy_pass $sre_entrypoint;
}
}
File renamed without changes.
Loading

0 comments on commit 35cbc56

Please sign in to comment.