Merge pull request 'changes-for-traefik' (#3) from changes-for-traefik into main
Reviewed-on: #3main
commit
3a8809849a
@ -1,8 +1,21 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM node:23 as build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./package.json /app/package.json
|
||||
COPY ./package-lock.json /app/package-lock.json
|
||||
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.22.0-alpine
|
||||
WORKDIR /var/www/
|
||||
|
||||
RUN mkdir -p /var/www/website
|
||||
COPY public /var/www/website
|
||||
COPY --from=build /app/public /var/www/website
|
||||
|
||||
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
EXPOSE 80
|
||||
@ -1,59 +1,17 @@
|
||||
include /etc/nginx/modules_enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name radioiceberg.net www.radioiceberg.net localhost 127.0.0.1;
|
||||
|
||||
location ~ /.well-known/acme-challenge {
|
||||
allow all;
|
||||
root /var/www/website;
|
||||
}
|
||||
|
||||
location / {
|
||||
rewrite ^ https://$host$request_uri? permanent;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
include /etc/nginx/mime.types;
|
||||
server_name radioiceberg.net www.radioiceberg.net localhost 127.0.0.1;
|
||||
|
||||
#SSL
|
||||
ssl_certificate /etc/letsencrypt/live/radioiceberg.net/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/radioiceberg.net/privkey.pem;
|
||||
|
||||
location / {
|
||||
root /var/www/website;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /stream {
|
||||
proxy_read_timeout 3000;
|
||||
proxy_connect_timeout 3000;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://icecast:8000/iceberg.ogg;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
|
||||
location /meta {
|
||||
proxy_pass http://metadata:7000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_connect_timeout 1d;
|
||||
proxy_send_timeout 1d;
|
||||
proxy_read_timeout 1d;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue