Skip to content

Commit 865fb59

Browse files
committed
add info to readme, chg docker-php, fix urls
1 parent 9be11da commit 865fb59

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ After installation run `init`
5151
## Docker
5252
Install yii2-app using [Docker](https://www.docker.com):
5353

54-
0. copy `.env-dist` to `.env`, configure if needed
55-
1. run command to create project
54+
0. run command to create project
5655
```
5756
docker run --rm --interactive --tty \
5857
--volume $PWD:/app \
5958
--volume ${COMPOSER_HOME:-$HOME/.composer}:/tmp \
6059
composer create-project --prefer-dist akiraz2/yii2-app my-site
6160
```
62-
2. copy `/mysql/docker-entrypoint-initdb.d/createdb.sql.example` to `createdb.sql` if you have ready DB
63-
3. `docker-compose build`
61+
1. copy `.env-dist` to `.env`, configure if needed
62+
2. copy `/mysql/docker-entrypoint-initdb.d/createdb.sql.example` to `createdb.sql` if you have ready DB (so dont run migrations)
63+
3. `docker-compose build` (you can configure Docker PHP in /php/Dockerfile-debian before building, for example, add mongodb)
6464
4. `docker-compose up -d`
65-
5. `docker-compose exec php bash`, in terminal run `php init`, then run other migrations (see next)
66-
6. open localhost:8100 to test (backend on localhost:8200)
65+
5. `docker-compose exec php bash`, in terminal run `composer install`, then `php init`, then run other migrations (see next)
66+
6. open [http://localhost:8100](http://localhost:8100) to test frontend (backend is on [http://localhost:8200](localhost:8200))
6767

6868
Access to Console App: `docker-compose exec php bash` and `php yii mycommand/action`
6969

@@ -77,9 +77,14 @@ php yii migrate --migrationPath=@yii/log/migrations/
7777
php yii migrate --migrationPath=vendor/ignatenkovnikita/yii2-queuemanager/migrations/
7878
php yii migrate/up
7979
```
80+
81+
### Default User Credentials
82+
login: `adminus`
83+
password: `adminus`
84+
8085
### Web server config
8186

82-
For newbies, I will recommend to read these instructions [yiisoft/yii2-app-advanced/start-installation.md](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-installation.md) (apache, nginx, etc\hosts
87+
For newbies, I will recommend reading these instructions [yiisoft/yii2-app-advanced/start-installation.md](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-installation.md) (apache, nginx, etc\hosts
8388

8489
## Development
8590

frontend/views/layouts/main.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
['label' => 'Contact', 'url' => ['/site/contact']],
4242
];
4343
if (Yii::$app->user->isGuest) {
44-
$menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
45-
$menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
44+
$menuItems[] = ['label' => 'Signup', 'url' => ['/user/register']];
45+
$menuItems[] = ['label' => 'Login', 'url' => ['/user/login']];
4646
} else {
4747
$menuItems[] = '<li>'
48-
. Html::beginForm(['/site/logout'], 'post')
48+
. Html::beginForm(['/user/logout'], 'post')
4949
. Html::submitButton(
5050
'Logout (' . Yii::$app->user->identity->username . ')',
5151
['class' => 'btn btn-link logout']

php/Dockerfile-debian

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN apt-get update && \
3030
default-mysql-client \
3131
openssh-client \
3232
nano \
33+
mc \
3334
unzip \
3435
libcurl4-openssl-dev \
3536
libssl-dev \
@@ -60,11 +61,11 @@ RUN docker-php-ext-configure gd \
6061
# Install PECL extensions
6162
# see http://stackoverflow.com/a/8154466/291573) for usage of `printf`
6263
RUN printf "\n" | pecl install \
63-
imagick \
64-
mongodb && \
64+
imagick && \
65+
#mongodb && \
6566
docker-php-ext-enable \
66-
imagick \
67-
mongodb
67+
imagick
68+
#mongodb
6869

6970
# Check if Xdebug extension need to be compiled
7071
RUN cd /tmp && \

0 commit comments

Comments
 (0)