* chore(docker): Adding dynamic env generator * ci(make): Create deployment yamls * ci(make): Generating docker envs * change env name structure * proper env names * chore(docker): clickhouse * chore(docker-compose): generate env file format * chore(docker-compose): Adding docker-compose * chore(docker-compose): format make * chore(docker-compose): Update version * chore(docker-compose): adding new secrets * ci(make): default target * ci(Makefile): Update common protocol * chore(docker-compose): refactor folder structure * ci(make): rename to docker-envs * feat(docker): add clickhouse volume definition Add clickhouse persistent volume to the docker-compose configuration to ensure data is preserved between container restarts. * refactor: move env files to docker-envs directory Updates all environment file references in docker-compose.yaml to use a consistent directory structure, placing them under the docker-envs/ directory for better organization. * fix(docker): rename imagestorage to images The `imagestorage` service and related environment file have been renamed to `images` for clarity and consistency. This change reflects the service's purpose of handling images. * feat(docker): introduce docker-compose template A new docker-compose template to generate docker-compose files from a list of services. The template uses helm syntax. * fix: Properly set FILES variable in Makefile The FILES variable was not being set correctly in the Makefile due to subshell issues. This commit fixes the variable assignment and ensures that the variable is accessible in subsequent commands. * feat: Refactor docker-compose template for local development This commit introduces a complete overhaul of the docker-compose template, switching from a helm-based template to a native docker-compose.yml file. This change simplifies local development and makes it easier to manage the OpenReplay stack. The new template includes services for: - PostgreSQL - ClickHouse - Redis - MinIO - Nginx - Caddy It also includes migration jobs for setting up the database and MinIO. * fix(docker-compose): Add fallback empty environment Add an empty environment to the docker-compose template to prevent errors when the env_file is missing. This ensures that the container can start even if the environment file is not present. * feat(docker): Add domainname and aliases to services This change adds the `domainname` and `aliases` attributes to each service in the docker-compose.yaml file. This is to ensure that the services can communicate with each other using their fully qualified domain names. Also adds shared volume and empty environment variables. * update version * chore(docker): don't pull parallel * chore(docker-compose): proper pull * chore(docker-compose): Update db service urls * fix(docker-compose): clickhouse url * chore(clickhouse): Adding clickhouse db migration * chore(docker-compose): Adding clickhouse * fix(tpl): variable injection * chore(fix): compose tpl variable rendering * chore(docker-compose): Allow override pg variable * chore(helm): remove assist-server * chore(helm): pg integrations * chore(nginx): removed services * chore(docker-compose): Mulitple aliases * chore(docker-compose): Adding more env vars * feat(install): Dynamically generate passwords dynamic password generation by identifying `change_me_*` entries in `common.env` and replacing them with random passwords. This enhances security and simplifies initial setup. The changes include: - Replacing hardcoded password replacements with a loop that iterates through all `change_me_*` entries. - Using `grep` to find all `change_me_*` tokens. - Generating a random password for each token. - Updating the `common.env` file with the generated passwords. * chore(docker-compose): disable clickhouse password * fix(docker-compose): clickhouse-migration * compose: chalice env * chore(docker-compose): overlay vars * chore(docker): Adding ch port * chore(docker-compose): disable clickhouse password * fix(docker-compose): migration name * feat(docker): skip specific values * chore(docker-compose): define namespace --------- Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
92 lines
3 KiB
Nginx Configuration File
92 lines
3 KiB
Nginx Configuration File
map $http_x_forwarded_for $real_ip {
|
|
~^(\d+\.\d+\.\d+\.\d+) $1;
|
|
default $remote_addr;
|
|
}
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
map $http_x_forwarded_proto $origin_proto {
|
|
default $http_x_forwarded_proto;
|
|
'' $scheme;
|
|
}
|
|
server {
|
|
listen 80;
|
|
|
|
location ~ ^/(mobs|sessions-assets|frontend|static|sourcemaps|ios-images|uxtesting-records)/ {
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_connect_timeout 300;
|
|
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "";
|
|
chunked_transfer_encoding off;
|
|
|
|
proxy_pass http://minio:9000;
|
|
}
|
|
|
|
location /minio/ {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://minio:9000;
|
|
}
|
|
location /ingest/ {
|
|
rewrite ^/ingest/(.*) /$1 break;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header X-Forwarded-For $real_ip;
|
|
proxy_set_header X-Forwarded-Host $real_ip;
|
|
proxy_set_header X-Real-IP $real_ip;
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://http-openreplay:8080;
|
|
proxy_read_timeout 300;
|
|
proxy_connect_timeout 120;
|
|
proxy_send_timeout 300;
|
|
# CORS Headers
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
add_header 'Access-Control-Allow-Methods' 'POST';
|
|
add_header 'Access-Control-Allow-Headers' 'Content-Type,Authorization,Content-Encoding';
|
|
add_header 'Access-Control-Expose-Headers' 'Content-Length';
|
|
}
|
|
|
|
location /api/ {
|
|
rewrite ^/api/(.*) /$1 break;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-Proto $origin_proto;
|
|
proxy_pass http://chalice-openreplay:8000;
|
|
}
|
|
|
|
location /assist/ {
|
|
rewrite ^/assist/(.*) /$1 break;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://assist-openreplay:9001;
|
|
}
|
|
location /ws-assist/ {
|
|
rewrite ^/ws-assist/(.*) /$1 break;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://assist-openreplay:9001;
|
|
}
|
|
location / {
|
|
index /index.html;
|
|
rewrite ^((?!.(js|css|png|svg|jpg|woff|woff2)).)*$ /index.html break;
|
|
proxy_set_header Host $http_host;
|
|
proxy_pass http://frontend-openreplay:8080;
|
|
proxy_intercept_errors on; # see http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_intercept_errors
|
|
error_page 404 =200 /index.html;
|
|
}
|
|
}
|