diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..bdca33b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..d7c444c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* -crlf \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fa03bff --- /dev/null +++ b/.gitignore @@ -0,0 +1,201 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# New VS2015 folders +.vs/ + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +!packages/*/build/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# NuGet Packages Directory +packages/ + +# Compare files +*.orig + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.pfx +*.publishsettings +*.swp + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + +# TeX files +Documentation/*.aux +Documentation/*.out +Documentation/*.pdf +Documentation/*.idx +Documentation/*.toc +Documentation/*.gz + +# image resizer cache +imagecache/ +*.DotSettings + +# TypeScript mapping files +*.js.map + +# Exclude all Typescript-generated JS files +src/Sunrise.Web.Customer/App/*.js +src/Sunrise.Web.Customer/App/**/*.js +src/Sunrise.Web.Customer/App/**/*.js +src/Sunrise.Web.Customer/Views/**/*.js +src/Sunrise.Web.Customer/Areas/**/*.js +src/Sunrise.Web.Support/Views/**/*.js + +*.GhostDoc.user.dic +*.GhostDoc.xml + +/TestResult.xml +*.VisualState.xml + +artifacts/ +/src/Sunrise.Web.Customer/Scripts/typings + +# Db project +src/Sunrise.Database/*.jfm +src/Sunrise.Database/Sunrise.Database.jfm +/src/Sunrise.Database/*.jfm +/src/Sunrise.Database/Sunrise.Database.jfm +/src/Sunrise.Web.Customer/node_modules + +# node modules +node_modules +.eslintrc + +#NCrunch folders +_NCrunch*/ +src/Sunrise.Web.FrontEnd/.eslintrc.js +src/Sunrise.Web.FrontEnd/.prettierrc +src/Sunrise.Web.FrontEnd/.vscode/settings.json +src/Sunrise.Web.Customer/Content/bundles/vendor.js diff --git a/.runsettings b/.runsettings new file mode 100644 index 0000000..07b5799 --- /dev/null +++ b/.runsettings @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + .*\.dll$ + .*\.exe$ + + + .*moq.dll + .*nunit3.testadapter.dll + + + + C:\b59fb11c-1611-4562-9a2b-c35719da65d3 + + + + + + + + True + + True + + True + + False + + True + + True + + True + + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e6f576d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM nginx +ENV NGINX_ENVSUBST_OUTPUT_DIR="/etc/nginx" +ENV NGINX_ENVSUBST_TEMPLATE_SUFFIX=".conf" +EXPOSE 80 +EXPOSE 443 +COPY ./nginx.conf /etc/nginx/templates/nginx.conf.conf \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0ca446a --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# Introduction +TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. + +# Getting Started +TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: +1. Installation process +2. Software dependencies +3. Latest releases +4. API references + +# Build and Test +TODO: Describe and show how to build your code and run the tests. + +# Contribute +TODO: Explain how other users and developers can contribute to make your code better. + +If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files: +- [ASP.NET Core](https://github.com/aspnet/Home) +- [Visual Studio Code](https://github.com/Microsoft/vscode) +- [Chakra Core](https://github.com/Microsoft/ChakraCore) \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..cf0b9fd --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,56 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)$(postfix)$(branchName) # NOTE: rev resets when the default retention period expires + +trigger: + branches: + include: + - '*' + +pool: + vmImage: ubuntu-latest # ubuntu-latest - set to windows-latest or another Windows vmImage for Windows builds + +variables: + containerRegistry: esuite.azurecr.io + DOCKER_BUILDKIT: 1 + + proxyImageName: 'e-suite.proxy' + + ${{ if eq(variables['Build.SourceBranchName'], 'master') }}: + branchName: '' + ${{ elseif startsWith(variables['Build.SourceBranch'], 'refs/heads/') }}: + branchName: $[ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), '/', '-' ) ] + ${{ elseif startsWith(variables['Build.SourceBranch'], 'refs/pull/') }}: + branchName: $[ replace(replace(variables['System.PullRequest.TargetBranch'], 'refs/heads/', ''), '/', '-' ) ] + + ${{ if eq(variables['branchName'], '') }}: + postfix: '' + ${{ else }}: + postfix: '-' + +steps: +- task: Docker@2 + displayName: Build e-suite Proxy Image + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + inputs: + command: build + repository: $(proxyImageName) + Dockerfile: Dockerfile + containerRegistry: | + $(containerRegistry) + tags: | + $(Build.BuildNumber) + +- task: Docker@2 + displayName: Push e-suite Proxy Image + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + inputs: + command: push + repository: $(proxyImageName) + containerRegistry: | + $(containerRegistry) + tags: | + $(Build.BuildNumber) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4a9c0e5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,36 @@ +name: esuite +services: + nginx-Local: + container_name: proxy + restart: unless-stopped + image: nginx + ports: + - 3001:80 + volumes: + - ./nginx.conf:/etc/nginx/templates/nginx.conf.conf + environment: + NGINX_ENVSUBST_OUTPUT_DIR: "/etc/nginx" + NGINX_ENVSUBST_TEMPLATE_SUFFIX: ".conf" + API_URL: "https://host.docker.internal:7066" + WEBUI_URL: "http://host.docker.internal:3000" + SERVER_NAME: localhost + + # nginx-container: + # container_name: proxy + # restart: unless-stopped + # image: esuite.azurecr.io/e-suite.proxy:2025.6.5.6-develop + # ports: + # - 3001:80 + # environment: + # API_URL: "https://host.docker.internal:7066" + # WEBUI_URL: "http://host.docker.internal:3000" + # SERVER_NAME: localhost + + + RabbitMq: + container_name: rabbitmq + restart: unless-stopped + image: rabbitmq + ports: + - 8080:15672 + - 5672:5672 \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..a43e8f3 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,98 @@ +worker_processes 1; + +events { worker_connections 1024; } + +http { + client_max_body_size 0; + sendfile on; + server_tokens off; + + server { + listen 80 default_server; + + server_name $SERVER_NAME; + + gzip on; + gzip_proxied any; + + location ^~ /swagger { + proxy_pass $API_URL/swagger; + #proxy_ssl_server_name on; + + #proxy_set_header Host $host; + proxy_set_header Referer $http_referer; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header X-Forwarded-Host $SERVER_NAME; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + + location ^~ /account/ { + proxy_pass $API_URL/account/; + #proxy_ssl_server_name on; + + #proxy_set_header Host $host; + proxy_set_header Referer $http_referer; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header X-Forwarded-Host $SERVER_NAME; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + + location ^~ /api/ { + proxy_pass $API_URL/api/; + #proxy_ssl_server_name on; + + #proxy_set_header Host $host; + proxy_set_header Referer $http_referer; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header X-Forwarded-Host $SERVER_NAME; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + + location ^~ /healthz { + proxy_pass $API_URL/healthz; + #proxy_ssl_server_name on; + + #proxy_set_header Host $host; + proxy_set_header Referer $http_referer; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header X-Forwarded-Host $SERVER_NAME; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + + location / { + proxy_pass $WEBUI_URL/; + #proxy_ssl_server_name on; + + #proxy_set_header Host $host; + proxy_set_header Referer $http_referer; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header X-Forwarded-Host $SERVER_NAME; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + } +} \ No newline at end of file