Skip to content

Commit

Permalink
chore: standardize indentation in non-conforming files (#177)
Browse files Browse the repository at this point in the history
* chore: standardize indentation to spaces

* chore: cleanup unused settings
  • Loading branch information
Fenrikur authored Aug 24, 2024
1 parent e03e67f commit 1c0f564
Show file tree
Hide file tree
Showing 25 changed files with 1,617 additions and 1,488 deletions.
2 changes: 1 addition & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "tab"
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
Expand Down
48 changes: 24 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ ENV NUGET_PACKAGES=/dotnet/packages
# Allow results of `dotnet restore` to be cached if there are no changes to dependencies.
COPY ./NuGet.config /app/NuGet.config
RUN --mount=type=cache,target=/dotnet/packages \
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
--mount=type=bind,source=./src/Eurofurence.App.Common/Eurofurence.App.Common.csproj,target=/app/src/Eurofurence.App.Common/Eurofurence.App.Common.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj,target=/app/src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj,target=/app/src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj,target=/app/src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj,target=/app/src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj,target=/app/src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj,target=/app/src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj,target=/app/test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj,target=/app/test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj,target=/app/test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj \
dotnet nuget config set repositoryPath /dotnet/packages --configfile /app/NuGet.config \
&& dotnet nuget config set globalPackagesFolder /dotnet/global-packages --configfile /app/NuGet.config \
&& dotnet restore
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
--mount=type=bind,source=./src/Eurofurence.App.Common/Eurofurence.App.Common.csproj,target=/app/src/Eurofurence.App.Common/Eurofurence.App.Common.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj,target=/app/src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj,target=/app/src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj,target=/app/src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj,target=/app/src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj,target=/app/src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj,target=/app/src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj,target=/app/test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj,target=/app/test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj,target=/app/test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj \
dotnet nuget config set repositoryPath /dotnet/packages --configfile /app/NuGet.config \
&& dotnet nuget config set globalPackagesFolder /dotnet/global-packages --configfile /app/NuGet.config \
&& dotnet restore

COPY ./src/ /app/src/
COPY ./test/ /app/test/
RUN --mount=type=cache,target=/dotnet/packages \
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=cache,target=/dotnet/artifacts \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
dotnet build src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --artifacts-path /dotnet/artifacts --configuration Release \
&& dotnet publish src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --artifacts-path /dotnet/artifacts --no-build --output "/app/artifacts" --configuration Release \
&& dotnet tool install --global dotnet-ef \
&& export PATH="$PATH:/root/.dotnet/tools" \
&& export ASPNETCORE_ENVIRONMENT="sample" \
&& dotnet ef migrations bundle -o "/app/artifacts/db-migration-bundle" -p src/Eurofurence.App.Infrastructure.EntityFramework
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=cache,target=/dotnet/artifacts \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
dotnet build src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --artifacts-path /dotnet/artifacts --configuration Release \
&& dotnet publish src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj --artifacts-path /dotnet/artifacts --no-build --output "/app/artifacts" --configuration Release \
&& dotnet tool install --global dotnet-ef \
&& export PATH="$PATH:/root/.dotnet/tools" \
&& export ASPNETCORE_ENVIRONMENT="sample" \
&& dotnet ef migrations bundle -o "/app/artifacts/db-migration-bundle" -p src/Eurofurence.App.Infrastructure.EntityFramework
ENTRYPOINT dotnet artifacts/Eurofurence.App.Server.Web.dll http://*:30001
EXPOSE 30001

Expand Down
42 changes: 21 additions & 21 deletions Dockerfile-backoffice
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ WORKDIR /app
# Allow results of `dotnet restore` to be cached if there are no changes to dependencies.
COPY ./NuGet.config /app/NuGet.config
RUN --mount=type=cache,target=/dotnet/packages \
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
--mount=type=bind,source=./src/Eurofurence.App.Common/Eurofurence.App.Common.csproj,target=/app/src/Eurofurence.App.Common/Eurofurence.App.Common.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj,target=/app/src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj,target=/app/src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj,target=/app/src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj,target=/app/src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj,target=/app/src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj,target=/app/src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj,target=/app/test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj,target=/app/test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj,target=/app/test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj \
dotnet nuget config set repositoryPath /dotnet/packages --configfile /app/NuGet.config \
&& dotnet nuget config set globalPackagesFolder /dotnet/global-packages --configfile /app/NuGet.config \
&& dotnet restore
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
--mount=type=bind,source=./src/Eurofurence.App.Common/Eurofurence.App.Common.csproj,target=/app/src/Eurofurence.App.Common/Eurofurence.App.Common.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj,target=/app/src/Eurofurence.App.Tools.CliToolBox/Eurofurence.App.Tools.CliToolBox.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj,target=/app/src/Eurofurence.App.Server.Services/Eurofurence.App.Server.Services.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj,target=/app/src/Eurofurence.App.Server.Web/Eurofurence.App.Server.Web.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj,target=/app/src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj,target=/app/src/Eurofurence.App.Infrastructure.EntityFramework/Eurofurence.App.Infrastructure.EntityFramework.csproj \
--mount=type=bind,source=./src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj,target=/app/src/Eurofurence.App.Domain.Model/Eurofurence.App.Domain.Model.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj,target=/app/test/Eurofurence.App.Server.Services.Tests/Eurofurence.App.Server.Services.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj,target=/app/test/Eurofurence.App.Server.Web.Tests/Eurofurence.App.Server.Web.Tests.csproj \
--mount=type=bind,source=./test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj,target=/app/test/Eurofurence.App.Tests.Common/Eurofurence.App.Tests.Common.csproj \
dotnet nuget config set repositoryPath /dotnet/packages --configfile /app/NuGet.config \
&& dotnet nuget config set globalPackagesFolder /dotnet/global-packages --configfile /app/NuGet.config \
&& dotnet restore

COPY ./src/ /app/src/
COPY ./test/ /app/test/
RUN --mount=type=cache,target=/dotnet/packages \
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=cache,target=/dotnet/artifacts \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
touch src/Eurofurence.App.Backoffice/wwwroot/appsettings.json \
&& dotnet build src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj --artifacts-path /dotnet/artifacts --configuration Release \
&& dotnet publish src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj --artifacts-path /dotnet/artifacts --no-build --output "/app/backoffice" --configuration Release
--mount=type=cache,target=/dotnet/global-packages \
--mount=type=cache,target=/dotnet/artifacts \
--mount=type=bind,source=./ef-app_backend-dotnet-core.sln,target=/app/ef-app_backend-dotnet-core.sln \
touch src/Eurofurence.App.Backoffice/wwwroot/appsettings.json \
&& dotnet build src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj --artifacts-path /dotnet/artifacts --configuration Release \
&& dotnet publish src/Eurofurence.App.Backoffice/Eurofurence.App.Backoffice.csproj --artifacts-path /dotnet/artifacts --no-build --output "/app/backoffice" --configuration Release
ENTRYPOINT dotnet artifacts/Eurofurence.App.Backoffice.dll http://*:30002
EXPOSE 30002

Expand Down
14 changes: 7 additions & 7 deletions docker/nginx/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ events {


http {
# Allow running nginx as non-root user
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
# Allow running nginx as non-root user
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp_path;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;

include /etc/nginx/mime.types;
default_type application/octet-stream;

Expand Down
40 changes: 20 additions & 20 deletions docker/nginx/etc/nginx/templates/default.conf.template
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
server {
http2 on;
listen 8080;
http2 on;
listen 8080;

# Support SSL via self-signed cert in development
listen 8443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
# Support SSL via self-signed cert in development
listen 8443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;

rewrite ^${BACKOFFICE_BASE_PATH}($|/.*$) /$1 last;
rewrite ^${BACKOFFICE_BASE_PATH}($|/.*$) /$1 last;

location / {
# Configuration required for Blazor WASM stand-alone app
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
location / {
# Configuration required for Blazor WASM stand-alone app
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;

include /etc/nginx/mime.types;
default_type application/octet-stream;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
}

# Serve appsettings.json with correct MIME type
location /appsettings.json {
root /usr/share/nginx/html;
add_header Content-Type application/json;
}
# Serve appsettings.json with correct MIME type
location /appsettings.json {
root /usr/share/nginx/html;
add_header Content-Type application/json;
}
}
13 changes: 13 additions & 0 deletions ef-app_backend-dotnet-core.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.indentSize": "tabSize",
"editor.tabSize": 4,
}
}
Loading

0 comments on commit 1c0f564

Please sign in to comment.