This repository contains a template to seed a repository for an Open Source project.
Prior to submitting your request for publication, make sure to review the Open Source guidelines for publications.
- Mergify is configured. You can edit or remove .mergify.yml.
The following is the template for the final README.md file:
{Project tag line}
{Small description of the purpose of the project}
The main prerequisites for a developer setup are:
- either Linux (including WSL) or macOS as OS;
- the Nix package manager with flakes enabled;
- direnv and nix-direnv;
- Docker;
- Visual Studio Code with the C# DevKit extension for debugging;
- an Azure account to deploy and run in the cloud.
Precise installations instructions are as follow:
- If you’re using Docker Desktop, remember to enable it in your WSL distro
- VS Code extensions must be activated in WSL.
- The ASP.NET Core developement certificate installed in WSL must be trusted in your Windows browser.
Then you need to trust the ASP.NET Core development certificate.
- Install the .NET SDK in Windows whichever way you want.
- Install and activate the ASP.NET Core development certificate (
[password]
being any password you’ll remember in the next minute). In Windows:
dotnet dev-certs https --clean
dotnet dev-certs https --trust
dotnet dev-certs https -ep https.pfx -p [password]
- Restart your browser to make sure it trusts the new certificate.
- Import the certificate in WSL and trust it for inter-service communications (
[path]
being the path to the windows directory you executed the previous commands, and[password]
being the password entered previously):
sudo apt install dotnet-sdk-8.0
dotnet dev-certs https --clean --import /mnt/c/[path]/https.pfx --password [password]
sudo -E dotnet dev-certs https -ep /usr/local/share/ca-certificates/aspnet/https.crt --format PEM
sudo update-ca-certificates
ASP.NET Core development certificate is more simple.
- Install a .NET SDK.
- Install and activate the ASP.NET Core development certificate
dotnet dev-certs https --clean
dotnet dev-certs https --trust
Use the Determinate Nix installer:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Follow any instructions, including those necessary to get nix in path.
- Install direnv.
nix profile install nixpkgs#nix-direnv
For bash this means adding the following line in your
~/.bashrc
:eval "$(direnv hook bash)"
For zsh (macOS), the file is
~/.zshrc
and the line iseval "$(direnv hook zsh)"
- Don’t forget to reload your shell
source ~/.bashrc
or
source ~/.zshrc
- Install nix-direnv in your user Nix profile and hook it up to direnv.
nix profile install nixpkgs#nix-direnv source $HOME/.nix-profile/share/nix-direnv/direnvrc
- Get this repository’s content
git checkout https://github.com/nventive/cloud-template.git
- Copy the template to wherever you want to have it and enable the development shell (you can replace
MyProject
with whatever you want). Warning: the last step may take a while, as it’s downloading/building all tools and dependencies.
cp -r cloud-template/template MyProject
cd MyProject
direnv allow
- Rename the project according to your inspirations (
Placeholder
is the actual string to be replaced;MyProject
can be whatever you want).
fd Placeholder | tac | xargs rnm -rs '/Placeholder/MyProject/g' -y
fd --hidden --type file --exec sd Placeholder MyProject
- Start VS Code. NB: it has to be started this way to ensure the correct .NET frawework is found and debugging works.
just code
To get a list of other recipes:
just --list
Further instructions are in the README
of your new project.
{More details/listing of features of the project}
Please consult BREAKING_CHANGES.md for more information about version history and compatibility.
This project is licensed under the Apache 2.0 license - see the LICENSE file for details.
Please read CONTRIBUTING.md for details on the process for contributing to this project.
Be mindful of our Code of Conduct.