You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
surtur b3755bfd56
ci: use linux-amd64 stable tag
2 weeks ago
Areas chore: cleanup in views 3 months ago
Controllers refactor: pass on List<Product> that has prod data 3 months ago
Deployment add systemd service file and nginx config snippet 3 months ago
Models deprecate Product in favour of SimilarProduct 3 months ago
Properties chore: add db connstring (dev) to launchSettings 3 months ago
Sqlscripts chore: bind the new."attr" as we're using postgres 4 months ago
Views add SimilarProducts partial view 3 months ago
wwwroot chore: reindent with tabs 3 months ago
.dockerignore add production compose file 3 months ago
.drone.yml ci: use linux-amd64 stable tag 2 weeks ago
.editorconfig add .editorconfig 2 months ago
.example-db.env add production compose file 3 months ago
.example-release_app.env add production compose file 3 months ago
.gitignore add production compose file 3 months ago
.hadolint.yaml feat: add hadolint Dockerfile linting 4 months ago
Dockerfile feat: unprivileged prod container w/ nobody+alpine 3 months ago
Dockerfile.dev feat: add hadolint Dockerfile linting 4 months ago
LICENSE feat: add LICENSE file 6 months ago
Makefile makefile: {build,compose build} w/ buildkit 3 months ago
Program.cs feat: use logger 3 months ago
README.md chore: change compose targets 4 months ago
Startup.cs add healthcheck endpoint at /health 3 months ago
appsettings.Development.json chore: postgre --> postgres 5 months ago
appsettings.json chore: postgre --> postgres 5 months ago
config.cs add: config values 3 months ago
docker-compose.prod.yml chore: bump traefik to v2.4.7 2 months ago
docker-compose.yml feat: use proper SELinux context for bind mounts 3 months ago
global.json chore: target 3.1.* + connected simplification 5 months ago
pwt-0x01-ng.csproj feat: add Customer area 3 months ago
pwt-0x01-ng.sln initial commit 7 months ago

README.md

pwt-0x01-ng

this repo holds sawce for PWT .netcore mvc project 0x01-ng

how to run this

  • Makefile (you need make for this) --> see the Makefile
  • direct dotnet (and/or docker) commands

useful Makefile targets

  • restore --> runs dotnet restore .
  • clean --> clean builds the project
  • build --> builds the project
  • dockerdevbuild --> clean-builds a container image from Dockerfile.dev (have a look in there for details)
  • dcdevb --> compose clean build of a debug (dev) version, pulling db
  • dcdevup --> runs the above (see docker-compose.yml)

you need to have created a db beforehand to run these

  • run --> runs $CURRENT_ENV dotnet watch run .
  • dev --> runs restore build run - this is kind of a convenience target

run using dotnet

run the dotnet commands from the solution folder note that a preconfigured db is required for any kind of running the project (consider taking a look at useful makefile targets)

on the first run, restore stuff

dotnet restore

build and run

dotnet build && dotnet run

errors

if you get a weird long error about not being able to listen bind a port, make sure nothing else is listening on the port this thing is trying to bind (tcp/5000).
if something else is already listening, solve it by killing it before running dotnet run or change the app port in Properties/launchSettings.json