diff --git a/Dockerfile b/Dockerfile index 17bf6e8..add8bcf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,5 +27,6 @@ RUN npm run build-ntc # Production stage FROM nginx:1.26.1-alpine COPY --from=builder /usr/src/app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..f062ea5 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + + # Redirect example + location /discord { + return 301 https://discord.gg/JTev3nzeDa; + } + + # Serve static files + location / { + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file