Commit c04cca21 authored by hengwen's avatar hengwen

Add nginx

parent eb18b903
......@@ -42,6 +42,10 @@ This will start a pure backend application. Now you can use the
to play with the simulation.
API doc can be found at [127.0.0.1:8090/swagger-ui.html](127.0.0.1:8090/swagger-ui.html)
To try it with visualization, download
[visualization project](https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/simulators/visualization),
uncomment the `nginx` part of `docker/docker-compose.yml`, comment or remove the `ports` field of `server`.
# Portable version
A portable version for Windows of the SmartFoxServer based simulator together with a portable PostgreSQL database is available as [archive](https://github.com/MontiSim/server/releases/download/portable/distributed-simulator.zip). Running the portable version can be done by running the `start-script.bat` file, provided in the archive.
......
......@@ -49,3 +49,13 @@ services:
restart: always
environment:
ZOO_SERVERS: zoo1:2181
# nginx:
# image: nginx:1.17
# ports:
# - 8090:8090
# restart: always
# volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
# # edit line below to use visualization
# - /path/to/visualization/src/main/webapp:/app
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
client_max_body_size 50m;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
# montisim-server-restful backend
server {
listen 8090;
server_name 127.0.0.1;
root /app;
add_header Access-Control-Allow-Origin * always;
add_header Access-Control-Allow-Methods '*' always;
location / {
proxy_pass http://server:8090;
}
}
# include servers/*;
}
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