Skip to content

Commit

Permalink
refactor: ♻️ upgrade to .net 8 and packages upgrade (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdihadeli authored Jul 27, 2024
1 parent b9ee7fd commit 18d55e7
Show file tree
Hide file tree
Showing 345 changed files with 3,757 additions and 2,262 deletions.
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"
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://containers.dev/guide/dockerfile#dockerfile
# https://github.com/devcontainers/images/tree/main/src/dotnet
# https://github.com/devcontainers/templates/tree/main/src/dotnet

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

# Add additional commands
130 changes: 130 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// 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": "Movie Search Application",
// 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, 8.0.303",
"aspNetCoreRuntimeVersions": "latest"
},
// 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/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"
},
// https://github.com/devcontainers/features/tree/main/src/node
"ghcr.io/devcontainers/features/node:1": {},
"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": "movie-search.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",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.smoothScrolling": true,
"editor.wordWrap": "on",
"editor.guides.bracketPairs": true,
"explorer.experimental.fileNesting.enabled": true,
"[csharp]": {
"editor.defaultFormatter": "csharpier.csharpier-vscode",
"editor.formatOnSave": true
}
},
"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",
"IBM.output-colorizer", // Colorize your output/test logs
"emmanuelbeziat.vscode-great-icons",
"esbenp.prettier-vscode",
"vscode-icons-team.vscode-icons",
"redhat.vscode-yaml"
]
}
},
"hostRequirements": {
"cpus": 4,
"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
28 changes: 28 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/secrets.dev.yaml
**/values.dev.yaml
**/bin/
**/obj/
**/out/
LICENSE
README.md
local/data/
portainer-data/
Loading

0 comments on commit 18d55e7

Please sign in to comment.