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 4fd4146b1d
feat: unprivileged prod container w/ nobody+alpine
2 days ago
Areas chore: cleanup in views 7 days ago
Controllers refactor: pass on List<Product> that has prod data 4 days ago
Deployment add systemd service file and nginx config snippet 3 days ago
Models deprecate Product in favour of SimilarProduct 1 week ago
Properties chore: add db connstring (dev) to launchSettings 1 week ago
Sqlscripts chore: bind the new."attr" as we're using postgres 2 months ago
Views add SimilarProducts partial view 4 days ago
wwwroot chore: reindent with tabs 2 weeks ago
.dockerignore add production compose file 3 days ago
.drone.yml rename: pluginscache --> pkgcache 2 weeks ago
.example-db.env add production compose file 3 days ago
.example-release_app.env add production compose file 3 days ago
.gitignore add production compose file 3 days ago
.hadolint.yaml feat: add hadolint Dockerfile linting 4 weeks ago
Dockerfile feat: unprivileged prod container w/ nobody+alpine 2 days ago
Dockerfile.dev feat: add hadolint Dockerfile linting 4 weeks ago
LICENSE feat: add LICENSE file 3 months ago
Makefile makefile: {build,compose build} w/ buildkit 2 days ago
Program.cs feat: use logger 2 weeks ago
README.md chore: change compose targets 1 month ago
Startup.cs add healthcheck endpoint at /health 3 days ago
appsettings.Development.json chore: postgre --> postgres 2 months ago
appsettings.json chore: postgre --> postgres 2 months ago
config.cs add: config values 2 weeks ago
docker-compose.prod.yml feat: unprivileged prod container w/ nobody+alpine 2 days ago
docker-compose.yml feat: use proper SELinux context for bind mounts 2 weeks ago
global.json chore: target 3.1.* + connected simplification 2 months ago
pwt-0x01-ng.csproj feat: add Customer area 2 weeks ago
pwt-0x01-ng.sln initial commit 4 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