Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/dotnet 8 upgrade #18

Merged
merged 2 commits into from
Jul 20, 2024
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
62 changes: 62 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"version": 1,
"isRoot": true,
"tools": {
"altcover.global": {
"version": "8.8.74",
"commands": [
"altcover"
],
"rollForward": false
},
"cake.tool": {
"version": "2.3.0",
"commands": [
"dotnet-cake"
],
"rollForward": false
},
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
],
"rollForward": false
},
"csharpier": {
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
],
"rollForward": false
},
"swashbuckle.aspnetcore.cli": {
"version": "6.6.2",
"commands": [
"swagger"
],
"rollForward": false
},
"microsoft.tye": {
"version": "0.11.0-alpha.22111.1",
"commands": [
"tye"
],
"rollForward": false
},
"dotnet-ef": {
"version": "8.0.7",
"commands": [
"dotnet-ef"
],
"rollForward": false
},
"dotnet-outdated-tool": {
"version": "4.6.4",
"commands": [
"dotnet-outdated"
],
"rollForward": false
}
}
}
8 changes: 8 additions & 0 deletions .csharpierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://csharpier.com/docs/Configuration
printWidth: 120
useTabs: false
tabWidth: 4
preprocessorSymbolSets:
- ""
- "DEBUG"
- "DEBUG,CODE_STYLE"
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://containers.dev/guide/dockerfile#dockerfile

FROM mcr.microsoft.com/devcontainers/dotnet:latest

# Add additional commands
113 changes: 113 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
// https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/setting-up-your-dotnet-project-for-codespaces
// https://github.com/microsoft/vscode-remote-try-dotnet
// https://dev.to/this-is-learning/set-up-github-codespaces-for-a-net-8-application-5999
// https://audacioustux.notion.site/Getting-Started-with-Devcontainer-c727dbf9d56f4d6b9b0ef87b3111693f
{
"name": "Food Delivery Modular Monolith",
// use existing dev container templates. More info: https://containers.dev/guide/dockerfile, https://containers.dev/templates
//"image": "mcr.microsoft.com/devcontainers/dotnet:1-7.0",
// use a Dockerfile file. More info: https://containers.dev/guide/dockerfile#dockerfile
// "build": {
// // Path is relative to the devcontainer.json file.
// "dockerfile": "Dockerfile"
// },
// using a Dockerfile with Docker Compose, https://containers.dev/guide/dockerfile#docker-compose-image
"dockerComposeFile": "docker-compose.yaml",
"service": "devcontainer",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// https://github.com/devcontainers/features/tree/main/src/dotnet#dotnet-cli-dotnet
"ghcr.io/devcontainers/features/dotnet:2": {
// this version should be matched with global.json .net version for working vscode IntelliSense correctly
"version": "8.0.303",
"additionalVersions": "latest, 7.0.410, 8.0.303, 6.0.424",
"aspNetCoreRuntimeVersions": "latest, 7.0"
},
// https://github.com/devcontainers/features/tree/main/src/github-cli
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "2"
},
// https://github.com/devcontainers/features/tree/main/src/powershell
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
// https://github.com/devcontainers/features/tree/main/src/node
"ghcr.io/devcontainers/features/node:1": {},
// // https://github.com/devcontainers/features/tree/main/src/kubectl-helm-minikube
// "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {},
// // https://github.com/devcontainers/features/tree/main/src/terraform
// "ghcr.io/devcontainers/features/terraform:1": {},
// https://github.com/devcontainers/features/tree/main/src/docker-in-docker
// https://devopscube.com/run-docker-in-docker/
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/git:1": {},
// https://github.com/devcontainers/features/tree/main/src/common-utils
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {
"git.autofetch": true,
"files.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"explorer.autoReveal": true,
"resmon.show.cpufreq": false,
"dotnet.defaultSolution": "food-delivery.sln",
"dotnet.server.startTimeout": 60000,
"omnisharp.projectLoadTimeout": 60,
"workbench.colorTheme": "Visual Studio Light",
"workbench.iconTheme": "material-icon-theme",
"editor.minimap.enabled": false,
"editor.fontFamily": "'MesloLGM Nerd Font', 'Droid Sans Mono', 'monospace', 'Droid Sans Fallback', 'Consolas'",
"editor.fontSize": 14,
"explorer.confirmDelete": false,
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.defaultProfile.linux": "zsh",
"powershell.cwd": "~",
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe"
},
"extensions": [
"streetsidesoftware.code-spell-checker",
"ms-dotnettools.csdevkit",
"mutantdino.resourcemonitor",
"humao.rest-client",
"dzhavat.bracket-pair-toggler",
"ms-azuretools.vscode-docker",
"vivaxy.vscode-conventional-commits",
"emmanuelbeziat.vscode-great-icons",
"ms-vscode.vs-keybindings",
"GitHub.vscode-github-actions",
"PKief.material-icon-theme",
"EditorConfig.EditorConfig",
"DavidAnson.vscode-markdownlint"
]
}
},
"hostRequirements": {
"cpus": 2,
"memory": "8gb",
"storage": "32gb"
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [5000, 5001],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }
// https://containers.dev/implementors/json_reference/#lifecycle-scripts
"updateContentCommand": "chmod +x .devcontainer/scripts/update.sh",
"postCreateCommand": "chmod +x .devcontainer/scripts/post-create.sh"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
26 changes: 26 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# https://containers.dev/guide/dockerfile#docker-compose-image
# https://containers.dev/guide/dockerfile#docker-compose-dockerfile
services:
devcontainer:
build:
context: .
volumes:
- ../..:/workspaces:rw,cached
init: true
command: sleep infinity

# services:
# devcontainer:
# image: mcr.microsoft.com/devcontainers/dotnet:3.1.0
# volumes:
# - ../..:/workspaces:cached
# network_mode: service:db
# command: sleep infinity

# db:
# image: postgres:latest
# restart: unless-stopped
# environment:
# POSTGRES_PASSWORD: postgres
# POSTGRES_USER: postgres
# POSTGRES_DB: postgres
6 changes: 6 additions & 0 deletions .devcontainer/scripts/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -eax

# Run the setup_fonts.sh script
./setup-fonts.sh
24 changes: 24 additions & 0 deletions .devcontainer/scripts/setup-fonts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Download MesloLGM Nerd Font
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Meslo.zip -O MesloLGM.zip

# Extract the font files
unzip MesloLGM.zip -d MesloLGM

# Create the fonts directory if it doesn't exist
mkdir -p ~/.local/share/fonts

# Move the font files to the fonts directory
mv MesloLGM/*.ttf ~/.local/share/fonts/

# Update the font cache
fc-cache -fv

# Clean up
rm -rf MesloLGM.zip MesloLGM

# Verify installation
fc-list | grep "MesloLGM"

echo "Font setup completed."
3 changes: 3 additions & 0 deletions .devcontainer/scripts/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

set -eax
63 changes: 63 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp

###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary

###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,8 @@ csx/
ecf/
rcf/

# Windows ECommerce app package directories and files
AppPackages/
BundleArtifacts/
Package.ECommerceAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
Expand Down Expand Up @@ -349,7 +347,29 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/

.idea
.tye/
.logs/
.Log

out/
**/.vagrant/
.idea/
local/data/
portainer-data/
docker.sock/
localtime/
coveragereport/
CoverageResults/
coverage.cobertura.xml
coverage.info

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# exclude sensitive env files
.env
.env.dev
.denv.prod
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"git.autofetch": true,
"files.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"explorer.autoReveal": true,
"resmon.show.cpufreq": false,
"dotnet.defaultSolution": "food-delivery.sln",
"dotnet.server.startTimeout": 60000,
"omnisharp.projectLoadTimeout": 60,
"workbench.colorTheme": "Visual Studio Light",
"workbench.iconTheme": "material-icon-theme",
"editor.minimap.enabled": false,
"editor.fontFamily": "'MesloLGM Nerd Font', 'Droid Sans Mono', 'monospace', 'Droid Sans Fallback', 'Consolas'",
"editor.fontSize": 14,
"explorer.confirmDelete": false,
"terminal.integrated.defaultProfile.windows": "PowerShell",
"terminal.integrated.defaultProfile.linux": "zsh",
"powershell.cwd": "~",
"terminal.external.windowsExec": "%LOCALAPPDATA%\\Microsoft\\WindowsApps\\pwsh.exe"
}
Loading
Loading