Skip to content
Snippets Groups Projects
Commit 866e4f27 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

add nginx deployment

parent eb10e092
No related branches found
No related tags found
No related merge requests found
Pipeline #9083 passed
......@@ -30,6 +30,14 @@ services:
traefik.http.middlewares.tileserversts.headers.stsincludesubdomains: false
traefik.http.middlewares.tileserversts.headers.stspreload: true
traefik.http.middlewares.tileserversts.headers.stsseconds: 31536000
nginx:
image: nginx:1.25.4
restart: unless-stopped
ports:
- 8080:80
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
networks:
traefik:
external: true
server {
listen 80;
server_name localhost;
#access_log /var/log/nginx/host.access.log main;
# Disable root application access. You may want to allow this in development.
location ~ ^/$ {
return 404;
}
# Disable root application access. You may want to allow this in development.
location /favicon.ico {
return 404;
}
location / {
proxy_pass http://maptiler:8080/;
proxy_pass_request_headers on;
# Enable proxy cache
#proxy_cache TileserverCache;
#proxy_cache_valid 200 1w;
# Set our custom CORS
#add_header 'Access-Control-Allow-Origin' $allow_origin;
# If you need to see nginx cache status. Uncomment line below.
add_header X-Cache-Status $upstream_cache_status;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
\ No newline at end of file
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment