-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c971333
commit 6df785c
Showing
6 changed files
with
94 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,48 @@ | ||
.PHONY: local-dev-postgresql | ||
local-dev-postgresql: | ||
docker-compose --file deploy/dev-postgres/docker-compose.yml up --build -d | ||
sleep 5 | ||
docker exec -it $$(docker ps | grep php-fpm | awk '{print $$1}') bash -c "./bin/installl.sh" | ||
|
||
.PHONY: down-local-dev-postgresql | ||
down-local-dev-postgresql: | ||
docker-compose --file deploy/dev-postgres/docker-compose.yml down | ||
# Check for docker/podman | ||
DOCKER := $(shell command -v podman 2> /dev/null || command -v docker 2> /dev/null) | ||
|
||
# Check for docker-compose/podman-compose | ||
DOCKER_COMPOSE := $(shell command -v podman-compose 2> /dev/null || command -v docker-compose 2> /dev/null) | ||
|
||
.PHONY: info | ||
info: | ||
ifeq ($(DOCKER),) | ||
@echo "Neither docker nor podman is installed." | ||
exit 1 | ||
else | ||
@echo "Using $(DOCKER)" | ||
endif | ||
|
||
ifeq ($(DOCKER_COMPOSE),) | ||
@echo "Neither docker-compose nor podman-compose is installed." | ||
exit 1 | ||
else | ||
@echo "Using $(DOCKER_COMPOSE)" | ||
endif | ||
|
||
# Start the containers | ||
.PHONY: compose-up | ||
compose-up: | ||
$(DOCKER_COMPOSE) --file deploy/dev/docker-compose.yml up -d | ||
|
||
# Stop the containers | ||
.PHONY: compose-down | ||
compose-down: | ||
$(DOCKER_COMPOSE) --file deploy/dev/docker-compose.yml down | ||
|
||
# Get container ID | ||
.PHONY: $(FPM_ID) | ||
FPM_ID = $(shell $(DOCKER) ps | grep 'quay.io/kissj/php-ubi' | awk '{print $$1}') | ||
|
||
.PHONY: composer-install | ||
composer-install: | ||
$(DOCKER) exec -it -u root $(FPM_ID) sh -c "COMPOSER_ALLOW_SUPERUSER=1 composer install --no-interaction" | ||
|
||
.PHONY: migrate | ||
migrate: | ||
$(DOCKER) exec -it -u root $(FPM_ID) sh -c "COMPOSER_ALLOW_SUPERUSER=1 composer phinx:migrate --no-interaction" | ||
|
||
|
||
dev-up: info compose-up composer-install migrate | ||
dev-down: info compose-down | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
:80 { | ||
:8080 { | ||
root * /var/www/html/public | ||
file_server | ||
php_fastcgi {env.PHPFPM_HOST}:9000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
BASEPATH="" # app subfolder with leading slash only, eg. "/registration/kissj" - use "" if running on domain root | ||
DEBUG=true | ||
TEMPLATE_CACHE=true | ||
DEFAULT_LOCALE="cs" | ||
GIT_HASH="default" | ||
|
||
LOGGER_TARGET="file" # "file" or "stdout" # TODO implement | ||
LOGGER_FILENAME="app.log" | ||
LOGGER_LEVEL='DEBUG' # values defined in RFC 5424 (fe. DEBUG, INFO, ERROR) | ||
|
||
MAIL_DSN="smtp://mailhog:1025" # be careful on the encoding of the special symbols - https://symfony.com/doc/current/mailer.html#transport-setup | ||
MAIL_SEND_MAIL_TO_MAIN_RECIPIENT=true # keep true for sending emails | ||
|
||
FILE_HANDLER_TYPE="local" # "local" for saving into local filesystem, "s3bucket" for s3bucket | ||
S3_BUCKET="" | ||
S3_KEY="" | ||
S3_SECRET="" | ||
S3_REGION="" | ||
S3_ENDPOINT="" | ||
|
||
SENTRY_DSN="" | ||
SENTRY_PROFILING_RATE="0.5" # from 0 to 1 | ||
|
||
SKAUTIS_APP_ID="kissj" | ||
SKAUTIS_USE_TEST="true" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters