Skip to content

Commit

Permalink
Split run make target in run and create
Browse files Browse the repository at this point in the history
`make create` can be used to create the pod without starting it. `make
run` uses `create` to create a pod and uses `podman pod start` to
start it.
  • Loading branch information
Kritzefitz committed Sep 3, 2021
1 parent 4a31ff5 commit 3e9f805
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ PLATFORM ?= linux/386 linux/amd64 linux/arm/v6 linux/arm/v7 linux/arm64/v8 linux

build: manifest

run: pod
podman run \
create: pod
podman create \
--add-host grocy:127.0.0.1 \
--detach \
--env-file grocy.env \
Expand All @@ -21,7 +21,7 @@ run: pod
--volume /var/log/php8 \
--volume app-db:/var/www/data \
${IMAGE_PREFIX}/backend:${IMAGE_TAG}
podman run \
podman create \
--add-host grocy:127.0.0.1 \
--detach \
--name frontend \
Expand All @@ -31,6 +31,9 @@ run: pod
--volume /var/log/nginx \
${IMAGE_PREFIX}/frontend:${IMAGE_TAG}

run: create
podman pod start grocy-pod

pod:
podman pod rm -f grocy-pod || true
podman pod create --name grocy-pod --publish 127.0.0.1:8080:8080
Expand Down

0 comments on commit 3e9f805

Please sign in to comment.