- Clone the repository
git clone https://github.com/sakuexe/fullstack-portfolio.git
- Install the dependencies
cd dotnet-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/fullstack-portfolio.git
- Install docker
Guide for Ubuntu: Install Docker Engine on Ubuntu
-
Update the environment variables in the docker-compose file
-
Add your domain to the Caddyfile
# Caddyfile
yourdomain.com {
reverse_proxy dotnet:80
}
# with a quick sed command
sed -i 's/sakukarttunen.com/yourdomain.cool/g' caddy/Caddyfile
- Run docker compose
This will build the images and run the containers in the background
docker compose up --build -d
- Visit your domain
It should now have SSL certificates and have base data from the database. The initial build will take a while, when caddy has to get the certificates from Let's Encrypt.
- (Optional) Run the docker compose automatically on boot
All you have to do is add a symbolic link to /etc/systemd/system/
and enable the service
sudo ln -s $(pwd)/portfolio-docker.service /etc/systemd/system/
sudo systemctl enable portfolio-docker
sudo systemctl start portfolio-docker # if you haven't yet started the service
sudo systemctl status portfolio-docker