chore: change compose targets

* update Makefile and README
* [skip ci]
This commit is contained in:
surtur 2021-01-23 14:25:24 +01:00
parent d660c59cf7
commit 0741deaff9
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 8 additions and 5 deletions

View File

@ -23,7 +23,7 @@ pgdbargs = run -d $(pgdbcapdrop) $(pgdbenv) --name $(pgdbname) $(pgdbports) $(pg
pgdbimg = postgres:13.1-alpine
zenv = DB_CONNECTION_STRING=$$(cat appsettings.Development.json | jq .db.Postgres | sed -e 's/5432/5433/' -e 's/=db/=localhost/' -e 's/"//g')
.PHONY: dev dockerbuild dockerdevbuild dockerrun dockerdevrun dockertest dockerdev kaniko clean prune pgdba pgdbz test
.PHONY: dev dockerbuild dockerdevbuild dockerrun dockerdevrun dockertest dockerdev kaniko clean prune pgdba pgdbz test dcdevb dcdevup
dev: restore build run
@ -63,11 +63,14 @@ dockerdevrun:
@echo ======================
$(dcmdrun) -p $(lportdev):5000 $(dtagdev)
dcdevrun:
dcdevb:
docker-compose build --no-cache --pull --progress tty
dcdevup:
@echo ======================
@echo local dev port: $(lportdev)
@echo ======================
docker-compose up --build --remove-orphans
docker-compose up --remove-orphans
kaniko:
$(krelease)

View File

@ -11,8 +11,8 @@ this repo holds *sawce* for PWT .netcore mvc project 0x01-ng
- `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)
- `dcdevrun` --> runs compose that builds a debug (dev) version, pulls db and runs it according to [[docker-compose.yml]] together with the just-built image\
if you need a clean build, run this together with `dockerdevbuild`
- `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