Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prepare demo structure #37

Merged
merged 5 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ SHARED_SERVICES_NAMESPACE=ss
# https://docs.docker.com/compose/reference/envvars/#compose_project_name
COMPOSE_PROJECT_NAME=spiral-starter-tpl

# You can disable logging for containers by setting "none" as log driver
DOCKER_APP_LOG_DRIVER=json-file
DOCKER_DATABASE_LOG_DRIVER=json-file
DOCKER_MAIL_LOG_DRIVER=json-file
DOCKER_STORAGE_LOG_DRIVER=json-file
DOCKER_TEMPORAL_DATABASE_LOG_DRIVER=json-file
DOCKER_TEMPORAL_LOG_DRIVER=json-file
DOCKER_TEMPORAL_UI_LOG_DRIVER=json-file

#######################################
# Spiral default environment variables
#######################################
Expand Down
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,32 @@ prepare:
# Docker Actions
# ------------------------------------------------------------------------------------
up: # Creates and starts containers, defined in docker-compose and override file
$(DOCKER_COMPOSE) up --remove-orphans -d
$(DOCKER_COMPOSE) up --remove-orphans -d --wait
@sleep 1
$(DOCKER_COMPOSE) exec app wait4x postgresql 'postgres://${DB_USERNAME}:${DB_PASSWORD}@database:5432/${DB_DATABASE}?sslmode=disable' -t 1m
$(DOCKER_COMPOSE) exec app wait4x tcp '${TEMPORAL_ADDRESS}' -t 1m
@echo ""
@echo "${GREEN}Project is up and running!${RST}"
@echo ""
@echo "${BLUE}API:${RST} https://api.${COMPOSE_PROJECT_NAME}.docker"
@echo "${BLUE}Temporal UI:${RST} https://temporal.${COMPOSE_PROJECT_NAME}.docker"
@echo "${BLUE}API:${RST} https://api.${COMPOSE_PROJECT_NAME}.docker"
@echo "${BLUE}Temporal UI:${RST} https://temporal.${COMPOSE_PROJECT_NAME}.docker"
@echo "${BLUE}Mailpit UI (Fake SMTP):${RST} https://mail.${COMPOSE_PROJECT_NAME}.docker"
@echo "${BLUE}MinIO UI (Local S3):${RST} https://storage.${COMPOSE_PROJECT_NAME}.docker"
@echo ""
.PHONY: up

down: # Stops and removes containers of this project
$(DOCKER_COMPOSE) down --remove-orphans
.PHONY: down

up-app:
$(DOCKER_COMPOSE) up -d app
.PHONY: up-app

down-app:
$(DOCKER_COMPOSE) down app
.PHONY: down-app

purge: ## Stops and removes containers, volumes, networks and images
$(DOCKER_COMPOSE) down --remove-orphans --volumes
$(DOCKER) network prune --force
Expand Down Expand Up @@ -373,7 +383,8 @@ db-refresh: ## Delete migration files, wipe database, create new migrations, run
.PHONY: db-refresh

db-migrate: ## Run all pending migrations
$(APP_EXEC) php artisan migrate
@#$(APP_EXEC) php artisan migrate
$(APP_EXEC) php app.php cycle:migrate --split --run
.PHONY: db-migrate

#
Expand Down
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/runtime
rr*
protoc-gen-php-grpc*
.env
24 changes: 13 additions & 11 deletions app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,32 @@
"ext-pdo": "*",
"ext-sockets": "*",
"beberlei/assert": "^3.3",
"cycle/annotated": "^4.1",
"cycle/annotated": "^4.2",
"cycle/database": "^2.11",
"cycle/orm": "^2.8",
"cycle/entity-behavior": "^1.3",
"cycle/entity-behavior-uuid": "^1.2",
"cycle/orm": "^2.9",
"eventsauce/eventsauce": "^3.6",
"illuminate/collections": "^9.52",
"monolog/monolog": "^3.7",
"monolog/monolog": "^3.8",
"ramsey/uuid": "^4.7",
"spiral-packages/laravel-validator": "^1.1",
"spiral-packages/league-event": "^1.0",
"spiral-packages/scheduler": "^2.1",
"spiral-packages/scheduler": "^2.3",
"spiral-packages/yii-error-handler-bridge": "^1.1",
"spiral/cycle-bridge": "^2.9",
"spiral/cycle-bridge": "^2.10",
"spiral/data-grid-bridge": "^3.0",
"spiral/framework": "^3.13",
"spiral/framework": "^3.14",
"spiral/http": "^3.8",
"spiral/nyholm-bridge": "^1.3",
"spiral/roadrunner-bridge": "^3.6",
"spiral/roadrunner-bridge": "^3.7",
"spiral/roadrunner-cli": "^2.6",
"spiral/sapi-bridge": "^1.0",
"spiral/sentry-bridge": "^2.2",
"spiral/temporal-bridge": "^3.1",
"spiral/sapi-bridge": "^1.1",
"spiral/sentry-bridge": "^2.3",
"spiral/temporal-bridge": "^3.2",
"spiral/views": "^3.8",
"symfony/console": "^7.1",
"temporal/sdk": "^2.10"
"temporal/sdk": "^2.11"
},
"require-dev": {
"ergebnis/phpunit-slow-test-detector": "^2.15",
Expand Down
Loading