This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
surtur bb189cac7f
All checks were successful
continuous-integration/drone/push Build is passing
feat: add hadolint Dockerfile linting
commit 5acb4e2ba773d312c6b5159011ef415af53f8f71
Author: surtur <a_mirre@utb.cz>
Date:   Tue Jan 26 16:28:10 2021 +0100

    chore: rework ci pipeline logic

    * run {debug,release} builds after clone, then lint Dockerfile{,.dev}
      and finally run kaniko builds ({debug,release}) in parallel

commit 1e16f72eb4957b14c7fb316282d4cefae0811871
Author: surtur <a_mirre@utb.cz>
Date:   Tue Jan 26 16:19:50 2021 +0100

    feat: add hadolint Dockerfile linting

    to conform the linter and best practices:
    * add a FROM alias
    * quote variables (even though they're single-word and known in
      advance, might actually change it to ignore the warning)
2021-01-26 17:35:44 +01:00
Areas/Admin chore: proper column count (bootstrap 12) 2021-01-26 16:07:01 +01:00
Controllers chore: update {About,Contact} pages 2021-01-22 20:55:08 +01:00
Models chore: reword attr err msg + add help link 2021-01-26 14:57:41 +01:00
Properties chore: conditional razor runtime compilation 2020-12-27 16:22:27 +01:00
Sqlscripts chore: bind the new."attr" as we're using postgres 2021-01-03 02:38:26 +01:00
Views chore: defer validation js loading 2021-01-23 14:26:57 +01:00
wwwroot chore: more carousel validation goodies 2021-01-25 22:32:34 +01:00
.dockerignore chore: update .dockerignore for smaller images 2020-12-27 04:46:38 +01:00
.drone.yml feat: add hadolint Dockerfile linting 2021-01-26 17:35:44 +01:00
.gitignore chore: add stuff to the list of the ignored 2020-12-27 05:37:43 +01:00
.hadolint.yaml feat: add hadolint Dockerfile linting 2021-01-26 17:35:44 +01:00
Dockerfile feat: add hadolint Dockerfile linting 2021-01-26 17:35:44 +01:00
Dockerfile.dev feat: add hadolint Dockerfile linting 2021-01-26 17:35:44 +01:00
LICENSE feat: add LICENSE file 2020-11-21 14:21:19 +01:00
Makefile chore: change compose targets 2021-01-23 14:25:24 +01:00
Program.cs refactor: spaces --> tabs 2020-12-28 14:50:19 +01:00
README.md chore: change compose targets 2021-01-23 14:25:24 +01:00
Startup.cs chore: add response compression 2021-01-23 14:24:02 +01:00
appsettings.Development.json chore: postgre --> postgres 2020-12-26 19:28:41 +01:00
appsettings.json chore: postgre --> postgres 2020-12-26 19:28:41 +01:00
docker-compose.yml chore: setting this never gets old 2020-12-27 05:29:33 +01:00
global.json chore: target 3.1.* + connected simplification 2020-12-26 17:26:11 +01:00
pwt-0x01-ng.csproj chore: add image validation 2021-01-24 19:31:56 +01:00
pwt-0x01-ng.sln initial commit 2020-10-26 22:47:50 +01:00

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