Skip to content

Commit

Permalink
Merge pull request #44 from coldic3/feature/makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
coldic3 authored Sep 9, 2023
2 parents d872443 + 65a80c5 commit 2e9e100
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
all: install
install: build run setup

build:
@echo "Building Docker image..."
docker compose build

run:
@echo "Running Docker containers..."
docker compose up -d

stop:
@echo "Stopping Docker containers..."
docker compose down

uninstall:
@echo "Stopping and removing Docker containers..."
docker compose down
@echo "Removing images..."
docker compose rm -f
docker rmi $(shell docker compose images -q) || true

setup:
@echo "Generate JWT keys..."
docker compose exec php sh -c '\
set -e\
apk add openssl\
php bin/console lexik:jwt:generate-keypair\
setfacl -R -m u:www-data:rX -m u:"$(whoami)":rwX config/jwt\
setfacl -dR -m u:www-data:rX -m u:"$(whoami)":rwX config/jwt\
'

0 comments on commit 2e9e100

Please sign in to comment.