Skip to content

Commit

Permalink
Add docker/nginx/dev-roadrunner.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusklocke committed Feb 15, 2024
1 parent 97976fb commit 0bec56e
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
47 changes: 47 additions & 0 deletions docker/nginx/dev-roadrunner.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name localhost;
return 301 https://$host$request_uri;
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name localhost;

add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range,X-Token';

ssl_certificate /etc/nginx/certs/lima.local.crt;
ssl_certificate_key /etc/nginx/certs/lima.local.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;

gzip on;
gzip_types application/json application/javascript image/png application/font-woff2 image/x-icon;

client_max_body_size 64M;

location /api {
proxy_pass http://php:8080;
}

location /ws {
proxy_pass http://ui:3098/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}

location /logos {
alias /var/www/logos;
}

location / {
proxy_pass http://ui:3098;
}
}
6 changes: 5 additions & 1 deletion docker/nginx/dev.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ server {
client_max_body_size 64M;

location /api {
proxy_pass http://php:8080;
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_param DOCUMENT_ROOT /var/www/api/public;
fastcgi_param SCRIPT_NAME index.php;
fastcgi_param SCRIPT_FILENAME /var/www/api/public/index.php;
}

location /ws {
Expand Down

0 comments on commit 0bec56e

Please sign in to comment.