- ASP.NET Core | ASP.NET Core - Microsoft
- MongoDB | MongoDB: The Developer Data Platform
- xUnit | Unit testing C# in .NET using dotnet test and xUnit - Microsoft
- Docker & Docker Compose | Docker Docs - Docker
- Traefik | Traefik, The Cloud Native Application Proxy - Traefik Labs
- Watchtower | Watchtower - containrrr.dev
- Clone the repository
git clone https://github.com/sakuexe/portfolio.git
- Install the dependencies
cd portfolio
dotnet restore
npm ci
- Run the project
dotnet run
- For Development, run the project in watch mode
# run the project in watch mode
npm run dev & dotnet watch
- Clone the project
git clone https://github.com/sakuexe/portfolio.git
- Use the
example.env
file to add a.env
file to the root of the project
cd portfolio
mv ./example.env.txt ./.env
# edit the contents to your needs
vi .env
# or if you're a weirdo
nano .env
- Install docker
Guide for Ubuntu: Install Docker Engine on Ubuntu
- Update the docker-compose to include your domain name, instead of mine
# replace myepicwebsite.cool with your domain
echo "myepicwebsite.cool" | xargs -I {} sed -i 's/sakukarttunen.com/{}/g' docker-compose.yml
- Run docker compose
This will build the images and run the containers in the background
docker compose up --build -d
# check that all went well
docker logs portfolio-1
- Visit your domain
It should now have SSL certificates and include base data in the database. The initial build will take a while, when traefik has to get the certificates from Let's Encrypt.
- Check the size of the docker image
docker manifest inspect -v ghcr.io/sakuexe/portfolio:prod | grep size | awk -F ':' '{sum+=$NF} END {print sum}' | numfmt --to=iec-i