Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,13 @@ services:
# volumes:
# db_data:
# fa_config:

# proxy:
# image: nginx:latest
# container_name: nginx-proxy
# restart: unless-stopped
# ports:
# - 80:80
# - 443:443
# volumes:
# - ./proxy-default.conf:/etc/nginx/conf.d/default.conf
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
/** @type {import('next').NextConfig} */

const isProd = process.env.NODE_ENV === 'production'

const nextConfig = {
reactStrictMode: true,
swcMinify: true,
// "/admin" is the path we would use in the reverse proxy, so change accordingly if you want to use some other path
assetPrefix: isProd ? '/admin' : undefined,
}

module.exports = nextConfig
16 changes: 16 additions & 0 deletions proxy-default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
listen 80;
server_name localhost;

location /admin/ {
proxy_pass http://portal:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 5;
proxy_send_timeout 60;
proxy_read_timeout 70;
proxy_set_header X-Forwarded-Proto $scheme;
}

}