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: change template naming #1

Merged
merged 1 commit into from
May 12, 2023
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
13 changes: 7 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ LOG_LEVEL=debug

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_PORT=5432
DB_DATABASE=wod
DB_USERNAME=wod
DB_PASSWORD=password
DB_FORWARD_PORT=5433

CACHE_DRIVER=file
FILESYSTEM_DISK=local
Expand Down Expand Up @@ -79,17 +80,17 @@ SENTRY_TRACES_SAMPLE_RATE=1.0
# Create slack app and add incoming webhook urls
# https://api.slack.com/messaging/webhooks
DEPLOYER_STAGING_SLACK_WEBHOOK=https://hooks.slack.com/services/XXXXXXX/XXXXX/XXXXXX
DEPLOYER_STAGING_REMOTE_USER=staging-xxxxx
DEPLOYER_STAGING_HOST=staging.laravel-starter-tpl.wayof.dev
DEPLOYER_STAGING_REMOTE_USER=staging-pbb2p
DEPLOYER_STAGING_HOST=staging.laravel-cycle-starter-tpl.wayof.dev
DEPLOYER_STAGING_BRANCH=develop

DEPLOYER_PROD_SLACK_WEBHOOK=https://hooks.slack.com/services/XXXXXXX/XXXXX/XXXXXX
DEPLOYER_PROD_REMOTE_USER=prod-xxxxx
DEPLOYER_PROD_HOST=prod.laravel-starter-tpl.wayof.dev
DEPLOYER_PROD_REMOTE_USER=prod-btkvj
DEPLOYER_PROD_HOST=prod.laravel-cycle-starter-tpl.wayof.dev
DEPLOYER_PROD_BRANCH=master

# https://wayofdev.sentry.io/settings/account/api/auth-tokens/
DEPLOYER_SENTRY_TOKEN=50b88fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEPLOYER_SENTRY_ORG=wayofdev
DEPLOYER_SENTRY_PROJECT=laravel-starter-tpl
DEPLOYER_SENTRY_PROJECT=laravel-cycle-starter-tpl
DEPLOYER_SENTRY_SERVER=https://wayofdev.sentry.io
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
APP_NAME: laravel
SHARED_SERVICES_NAMESPACE: ss
PROJECT_SERVICES_NAMESPACE: wod
COMPOSE_PROJECT_NAME: laravel-starter-tpl
COMPOSE_PROJECT_NAME: laravel-cycle-starter-tpl

- name: 🔑 Generate secret application key
run: php artisan key:generate
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
php: ["8.1"]
environment:
name: production
url: https://prod.laravel-starter-tpl.wayof.dev
url: https://prod.laravel-cycle-starter-tpl.wayof.dev

steps:
- name: 📦 Check out the codebase
Expand Down Expand Up @@ -54,11 +54,11 @@ jobs:
env:
DEPLOYER_STAGING_SLACK_WEBHOOK: ${{ secrets.DEPLOYER_STAGING_SLACK_WEBHOOK }}
DEPLOYER_STAGING_REMOTE_USER: ${{ secrets.DEPLOYER_STAGING_REMOTE_USER }}
DEPLOYER_STAGING_HOST: "staging.laravel-starter-tpl.wayof.dev"
DEPLOYER_STAGING_HOST: "staging.laravel-cycle-starter-tpl.wayof.dev"
DEPLOYER_STAGING_BRANCH: "develop"
DEPLOYER_PROD_SLACK_WEBHOOK: ${{ secrets.DEPLOYER_PROD_SLACK_WEBHOOK }}
DEPLOYER_PROD_REMOTE_USER: ${{ secrets.DEPLOYER_PROD_REMOTE_USER }}
DEPLOYER_PROD_HOST: "prod.laravel-starter-tpl.wayof.dev"
DEPLOYER_PROD_HOST: "prod.laravel-cycle-starter-tpl.wayof.dev"
DEPLOYER_PROD_BRANCH: "master"

- name: 📦 Create sentry release
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
php: ["8.1"]
environment:
name: staging
url: https://staging.laravel-starter-tpl.wayof.dev
url: https://staging.laravel-cycle-starter-tpl.wayof.dev

steps:
- name: 📦 Check out the codebase
Expand Down Expand Up @@ -54,11 +54,11 @@ jobs:
env:
DEPLOYER_STAGING_SLACK_WEBHOOK: ${{ secrets.DEPLOYER_STAGING_SLACK_WEBHOOK }}
DEPLOYER_STAGING_REMOTE_USER: ${{ secrets.DEPLOYER_STAGING_REMOTE_USER }}
DEPLOYER_STAGING_HOST: "staging.laravel-starter-tpl.wayof.dev"
DEPLOYER_STAGING_HOST: "staging.laravel-cycle-starter-tpl.wayof.dev"
DEPLOYER_STAGING_BRANCH: "develop"
DEPLOYER_PROD_SLACK_WEBHOOK: ${{ secrets.DEPLOYER_PROD_SLACK_WEBHOOK }}
DEPLOYER_PROD_REMOTE_USER: ${{ secrets.DEPLOYER_PROD_REMOTE_USER }}
DEPLOYER_PROD_HOST: "prod.laravel-starter-tpl.wayof.dev"
DEPLOYER_PROD_HOST: "prod.laravel-cycle-starter-tpl.wayof.dev"
DEPLOYER_PROD_BRANCH: "master"

...
2 changes: 1 addition & 1 deletion .github/workflows/sync-from-tpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: AndreasAugustin/[email protected]
with:
github_token: ${{ secrets.WORKFLOW_TOKEN }}
source_repo_path: wayofdev/laravel-starter-tpl
source_repo_path: wayofdev/laravel-cycle-starter-tpl
upstream_branch: master
pr_labels: 'type: maintenance'

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: fix-encoding-pragma

- repo: https://github.com/commitizen-tools/commitizen
rev: 3.2.1
rev: 3.2.2
hooks:
- id: commitizen
stages:
Expand Down
103 changes: 0 additions & 103 deletions CHANGELOG.md

This file was deleted.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BUILDER_PARAMS ?= docker run --rm -i \
--env COMPOSER_AUTH="$(COMPOSER_AUTH)"

BUILDER ?= $(BUILDER_PARAMS) $(SUPPORT_IMAGE)
BUILDER_WIRED ?= $(BUILDER_PARAMS) --network $(COMPOSE_PROJECT_NAME)_default $(SUPPORT_IMAGE)
BUILDER_WIRED ?= $(BUILDER_PARAMS) --network project.$(COMPOSE_PROJECT_NAME) $(SUPPORT_IMAGE)

# Shorthand wait4x command, executed through build-deps
WAITER ?= $(BUILDER_WIRED) wait4x
Expand Down Expand Up @@ -63,7 +63,7 @@ else
WHITE := ""
RST := ""
endif
MAKE_LOGFILE = /tmp/laravel-starter-tpl.log
MAKE_LOGFILE = /tmp/laravel-cycle-starter-tpl.log
MAKE_CMD_COLOR := $(BLUE)

default: all
Expand All @@ -78,7 +78,7 @@ help: ## Show this menu
@echo
@echo ' 📑 Logs are stored in $(MAKE_LOGFILE)'
@echo
@echo ' 📦 Package laravel-starter-tpl (github.com/wayofdev/laravel-starter-tpl)'
@echo ' 📦 Package laravel-cycle-starter-tpl (github.com/wayofdev/laravel-cycle-starter-tpl)'
@echo ' 🤠 Author Andrij Orlenko (github.com/lotyp)'
@echo ' 🏢 ${YELLOW}Org wayofdev (github.com/wayofdev)${RST}'
.PHONY: help
Expand All @@ -88,7 +88,7 @@ help: ## Show this menu
# Default action
# Defines default command when `make` is executed without additional parameters
# ------------------------------------------------------------------------------------
all: hooks key prepare up
all: hooks install key prepare up
.PHONY: all


Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<br>

<div align="center">
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-starter-tpl/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only">
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-starter-tpl/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only">
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-cycle-starter-tpl/master/assets/logo.gh-light-mode-only.png#gh-light-mode-only">
<img width="456" src="https://raw.githubusercontent.com/wayofdev/laravel-cycle-starter-tpl/master/assets/logo.gh-dark-mode-only.png#gh-dark-mode-only">
</div>

<br>

<br>

<div align="center">
<a href="https://actions-badge.atrox.dev/wayofdev/laravel-starter-tpl/goto"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fnext-starter-tpl%2Fbadge&style=flat-square"/></a>
<a href="https://github.com/wayofdev/laravel-starter-tpl/tags"><img alt="GitHub package.json version" src="https://img.shields.io/github/package-json/v/wayofdev/laravel-starter-tpl?style=flat-square"></a>
<a href="LICENSE.md"><img src="https://img.shields.io/github/license/wayofdev/laravel-starter-tpl.svg?style=flat-square&color=blue" alt="Software License"/></a>
<a href="#"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/laravel-starter-tpl/latest?style=flat-square"></a>
<a href="https://app.codecov.io/gh/wayofdev/laravel-starter-tpl">
<img alt="Codecov" src="https://img.shields.io/codecov/c/gh/wayofdev/laravel-starter-tpl?style=flat-square"></a>
<a href="https://actions-badge.atrox.dev/wayofdev/laravel-cycle-starter-tpl/goto"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Flaravel-cycle-starter-tpl%2Fbadge&style=flat-square"/></a>
<a href="https://github.com/wayofdev/laravel-cycle-starter-tpl/tags"><img alt="GitHub package.json version" src="https://img.shields.io/github/package-json/v/wayofdev/laravel-cycle-starter-tpl?style=flat-square"></a>
<a href="LICENSE.md"><img src="https://img.shields.io/github/license/wayofdev/laravel-cycle-starter-tpl.svg?style=flat-square&color=blue" alt="Software License"/></a>
<a href="#"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/laravel-cycle-starter-tpl/latest?style=flat-square"></a>
<a href="https://app.codecov.io/gh/wayofdev/laravel-cycle-starter-tpl">
<img alt="Codecov" src="https://img.shields.io/codecov/c/gh/wayofdev/laravel-cycle-starter-tpl?style=flat-square"></a>
</div>

<br>
Expand Down Expand Up @@ -86,10 +86,10 @@ To use this repository, you need to meet the following requirements:

1. **Clone** repository:

After forking or creating generating repository from template, you can clone it to your local machine. In this example we will use `laravel-starter-tpl` repository as starting point.
After forking or creating generating repository from template, you can clone it to your local machine. In this example we will use `laravel-cycle-starter-tpl` repository as starting point.

```bash
$ git clone [email protected]:wayofdev/laravel-starter-tpl.git
$ git clone [email protected]:wayofdev/laravel-cycle-starter-tpl.git
```

2. **Generate** `.env` file
Expand All @@ -101,7 +101,7 @@ To use this repository, you need to meet the following requirements:
APP_NAME=laravel \
SHARED_SERVICES_NAMESPACE=ss \
PROJECT_SERVICES_NAMESPACE=wod \
COMPOSE_PROJECT_NAME=laravel-starter-tpl
COMPOSE_PROJECT_NAME=laravel-cycle-starter-tpl
```

**Change** generated `.env` file to match your needs, if needed.
Expand All @@ -113,7 +113,7 @@ To use this repository, you need to meet the following requirements:
APP_NAME=laravel \
SHARED_SERVICES_NAMESPACE=ss \
PROJECT_SERVICES_NAMESPACE=wod \
COMPOSE_PROJECT_NAME=laravel-starter-tpl \
COMPOSE_PROJECT_NAME=laravel-cycle-starter-tpl \
FORCE=true
```

Expand All @@ -122,8 +122,9 @@ To use this repository, you need to meet the following requirements:
```bash
$ make

# or run commands separatley
# or run commands separately
$ make hooks
$ make install
$ make key
$ make prepare
$ make up
Expand All @@ -133,7 +134,7 @@ To use this repository, you need to meet the following requirements:

## 🤝 License

[![Licence](https://img.shields.io/github/license/wayofdev/laravel-starter-tpl?style=for-the-badge&color=blue)](./LICENSE)
[![Licence](https://img.shields.io/github/license/wayofdev/laravel-cycle-starter-tpl?style=for-the-badge&color=blue)](./LICENSE)

<br>

Expand Down
12 changes: 6 additions & 6 deletions app/deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
require 'recipe/laravel.php';
require 'contrib/slack.php';

set('application', 'laravel-starter-tpl');
set('repository', '[email protected]:wayofdev/laravel-starter-tpl.git');
set('application', 'laravel-cycle-starter-tpl');
set('repository', '[email protected]:wayofdev/laravel-cycle-starter-tpl.git');
set('base_deploy_path', '/home/ploi');

set('composer_options', '--verbose --no-progress --no-interaction --optimize-autoloader');
Expand All @@ -26,18 +26,18 @@ function getDefaultEnv(mixed $variable, mixed $default = null)

host('staging')
->set('branch', getDefaultEnv('DEPLOYER_STAGING_BRANCH', 'develop'))
->set('remote_user', getDefaultEnv('DEPLOYER_STAGING_REMOTE_USER', 'staging-crhev'))
->set('remote_user', getDefaultEnv('DEPLOYER_STAGING_REMOTE_USER', 'staging-pbb2p'))
->set('base_deploy_path', '/home/{{ remote_user }}')
->set('hostname', getDefaultEnv('DEPLOYER_STAGING_HOST', 'staging.laravel-starter-tpl.wayof.dev'))
->set('hostname', getDefaultEnv('DEPLOYER_STAGING_HOST', 'staging.laravel-cycle-starter-tpl.wayof.dev'))
->set('deploy_path', '{{ base_deploy_path }}/{{ hostname}}')
->set('slack_webhook', getDefaultEnv('DEPLOYER_STAGING_SLACK_WEBHOOK'))
->set('sub_directory', 'app');

host('prod')
->set('branch', getDefaultEnv('DEPLOYER_PROD_BRANCH', 'master'))
->set('remote_user', getDefaultEnv('DEPLOYER_PROD_REMOTE_USER', 'prod-ibce8'))
->set('remote_user', getDefaultEnv('DEPLOYER_PROD_REMOTE_USER', 'prod-btkvj'))
->set('base_deploy_path', '/home/{{ remote_user }}')
->set('hostname', getDefaultEnv('DEPLOYER_PROD_HOST', 'prod.laravel-starter-tpl.wayof.dev'))
->set('hostname', getDefaultEnv('DEPLOYER_PROD_HOST', 'prod.laravel-cycle-starter-tpl.wayof.dev'))
->set('deploy_path', '{{ base_deploy_path }}/{{ hostname }}')
->set('slack_webhook', getDefaultEnv('DEPLOYER_PROD_SLACK_WEBHOOK'))
->set('sub_directory', 'app');
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ services:
networks:
- default
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
- '${DB_FORWARD_PORT:-5433}:5432'
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "laravel-starter-tpl",
"version": "1.4.0"
"name": "laravel-cycle-starter-tpl",
"version": "1.0.0"
}