Skip to content

Commit 9204e90

Browse files
committed
📝 console commands, index, asset cleanup
1 parent 756b8f3 commit 9204e90

File tree

6 files changed

+151
-1
lines changed

6 files changed

+151
-1
lines changed

Diff for: guide/deployment/environments.md

+26
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,18 @@ See also `build/compose`.
3838
only:
3939
- latest
4040

41+
---
42+
43+
Transfer data from staging to migrations
44+
45+
- Go to `/resque`
46+
- `yii db/x-dump/data`
47+
- Download (via Moxiemanager or Filyfly)
48+
- Create file migration, place into tests/codeception/_migrations/VERSION
49+
- cd tests
50+
- make clean all
51+
- make run-tests (or make bash $ codecept run)
52+
4153

4254
Production
4355
==========
@@ -54,3 +66,17 @@ Production
5466
- auth
5567
- Use correct time in migration history
5668
- minimize the number of `dev-master` packages
69+
70+
## ENV variables
71+
72+
### Mailer config
73+
74+
APP_MAILER_HOST=mailcatcher
75+
APP_MAILER_USERNAME=smtp-user
76+
APP_MAILER_PASSWORD=secret
77+
78+
```
79+
APP_MAILER_HOST=mailcatcher
80+
APP_MAILER_USERNAME=smtp-user
81+
APP_MAILER_PASSWORD=secret
82+
```

Diff for: guide/development/console.md

+113-1
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,122 @@ make bash
1717
1818
$ composer update
1919

20+
#### Help `yii help`
21+
22+
```
23+
This is Yii version 2.0.10.
24+
25+
The following commands are available:
26+
27+
- app @link http://www.diemeisterei.de/
28+
app/clear-assets Clear [application]/web/assets folder.
29+
app/setup Initializes application.
30+
app/show-config Shows application configuration
31+
app/show-env Shows application environment variables.
32+
app/version (default) Displays application version from APP_VERSION constant.
33+
34+
- asset Allows you to combine and compress your JavaScript and CSS files.
35+
asset/compress (default) Combines and compresses the asset files according to the given configuration.
36+
asset/template Creates template of configuration file for [[actionCompress]].
37+
38+
- audit Task runner commands for Audit.
39+
audit/cleanup Cleanup the Audit data
40+
audit/error-email Email errors to support email.
41+
42+
- cache Allows you to flush cache.
43+
cache/flush Flushes given cache components.
44+
cache/flush-all Flushes all caches registered in the system.
45+
cache/flush-schema Clears DB schema cache for a given connection component.
46+
cache/index (default) Lists the caches that can be flushed.
47+
48+
- db MySQL database maintenance command.
49+
db/create Create MySQL database
50+
db/dump Dumps current database tables to runtime folder
51+
db/index (default) Displays tables in database
52+
db/x-dump EXPERIMENTAL: Schema and/or Data dumps
53+
db/x-dump-data EXPERIMENTAL: data only dump
54+
55+
- fixture Manages fixture data loading and unloading.
56+
fixture/load (default) Loads the specified fixture data.
57+
fixture/unload Unloads the specified fixtures.
58+
59+
- gii This is the command line version of Gii - a code generator.
60+
gii/controller Controller Generator
61+
gii/crud CRUD Generator
62+
gii/extension Extension Generator
63+
gii/form Form Generator
64+
gii/giiant-crud Giiant CRUD
65+
gii/giiant-extension Giiant Extension
66+
gii/giiant-model Giiant Model
67+
gii/giiant-module Giiant Module
68+
gii/giiant-test Giiant Test
69+
gii/index (default)
70+
gii/model Model Generator
71+
gii/module Module Generator
72+
73+
- giiant-batch @author Tobias Munk <[email protected]>
74+
giiant-batch/cruds Run batch process to generate CRUDs all given tables.
75+
giiant-batch/index (default) Run batch process to generate models and CRUDs for all given tables.
76+
giiant-batch/models Run batch process to generate models all given tables.
77+
78+
- help Provides help information about console commands.
79+
help/index (default) Displays available commands or the detailed information
80+
81+
- message Extracts messages to be translated from source files.
82+
message/config Creates a configuration file for the "extract" command using command line options specified
83+
message/config-template Creates a configuration file template for the "extract" command.
84+
message/extract (default) Extracts messages to be translated from source code.
85+
86+
- migrate Manages application and extension migrations (dmstr/yii2-migrate-command).
87+
migrate/create Creates a new migration.
88+
migrate/down Downgrades the application by reverting old migrations.
89+
migrate/history Displays the migration history.
90+
migrate/mark Modifies the migration history to the specified version.
91+
migrate/new Displays the un-applied new migrations.
92+
migrate/redo Redoes the last few migrations.
93+
migrate/to Upgrades or downgrades till the specified version.
94+
migrate/up (default) Upgrades the application by applying new migrations.
95+
96+
- resque Class ResqueController
97+
resque/debug
98+
resque/enqueue
99+
resque/inspect
100+
resque/prune-workers
101+
resque/status (default)
102+
resque/work
103+
104+
- serve Runs PHP built-in web server
105+
serve/index (default) Runs PHP built-in web server
106+
107+
- translate Command for scanning and optimizing project translations
108+
translate/help (default) Display this help.
109+
translate/optimize Removing unused language elements.
110+
translate/scan Detecting new language elements.
111+
112+
- user/confirm Confirms a user.
113+
user/confirm/index (default) Confirms a user by setting confirmed_at field to current time.
114+
115+
- user/create Creates new user account.
116+
user/create/index (default) This command creates new user account. If password is not set, this command will generate new 8-char password.
117+
118+
- user/delete Deletes a user.
119+
user/delete/index (default) Deletes a user.
120+
121+
- user/password Updates user's password.
122+
user/password/index (default) Updates user's password to given.
123+
124+
125+
To see the help of each command, enter:
126+
127+
yii help <command-name>
128+
```
129+
20130
#### Examples
21131

22132
##### Show environment variables (for bash)
23133

24134
$ env | sort
25135

26-
> Note, there may be additional ENV variables available in an application loadedfrom `src/app.env`
136+
> Note, there may be additional ENV variables available in an application loadedfrom `src/app.env`
137+
138+

Diff for: guide/development/frontend.md

+5
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Layout & navigation
2929
View files can be found in `src/views/layouts`.
3030

3131

32+
## Debugging application
33+
34+
- /debug
35+
36+
3237
Events
3338
------
3439

Diff for: guide/tutorials/asset-bundles.md

+4
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ changes for included files.
2323
2424
For bundling assets for production usage, see tutorial about [asset compression](../6-tutorials/asset-compression.md).
2525

26+
#### Cleanup
27+
28+
rm -rf /app/web/assets/*
29+
yii app/clear-assets --interactive=0

Diff for: help/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# phd5 - help
22

3+
- [Overview](index.md)
4+
35
## Tutorials
46

57
- [Initial setup as admin](tutorial-admin.md)

Diff for: help/module-users-rbac.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Module: Users
55
Module: RBAC
66
--------
77

8+
/rbac/role/update?name=Public

0 commit comments

Comments
 (0)