Personal portfolio website. Created using C#, aspnetcore, nuxt, tailwindcss, docker, and more.
- nuxt
- nuxtjs/tailwindcss
Other dependencies
- sparticles
- vue-class-component
- vue-property-decorator
- nuxtjs/axios
- dayjs
- marked
- ASP.NET Core
- Dapper
- SqlKata
- Npgsql
- DDD Design
- CRUD
Before trying to initialize this project on a webhost, make sure docker, and docker-compose are installed. Along with that, make sure you got a web server ready to serve the client html files. This is only required if you use nuxt's generate static pages method.
Note that while you may pull the docker container for server/Pointer, the client project does not have such feature. For that part of the application you must build it yourself. You can do so by using nuxt generate
within the client
folder.
- Download the docker-compose.yml to your hosting path. Double check port numbers, image names, and volumes.
- Create a
.env
file based on the .env.sample file. Here you must set the three environment variables for postgres:POSTGRES_USER
,POSTGRES_PASSWORD
, &POSTGRES_DB
- Create a
appsettings.json
file based on the appsettings.json.sample. Make sure the Connection string matches the one set above in the.env
. - Your directory tree should now look something like this:
.env
appsettings.json
docker-compose.yml
Rundocker-compose up -d
within the directory to start the api. By now you should be able to navigate to one of the routes in the application. You can also visit swagger by going to{YOUR_DOMAIN}/swagger
.
- Create a way for the world to interface with the running api. This is different for everyone, and depends on your usecase. For one, they might want to use Traefik while others (myself included) just create nginx reverse proxy listing on a path of choosing (eg
/api/
).
- This varies from person to person. I myself just used
nuxt generate
and used nginx to serve the provided html files. Do make sure yourtry_files
includes the200.html
file for dynamic routing. eg:try_files $uri $uri/ /200.html;
Run the dotnet build
tool on the project Pointer.Presentation.Api
. This project will be the entry point of the application. An example command would be:
dotnet build Pointer.Presentation.Api/Pointer.Presentation.Api.csproj --configuration Release
. Make sure your current working directory is set to server
.
Set your working directory to server
and run the docker image build command on the Dockerfile.