Skip to content

Commit

Permalink
Change phpcensor init command. Add admin specifying feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
ketchoop committed Feb 5, 2017
1 parent 400fb44 commit 129dd9d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ ADD entrypoint.sh /
ADD config.tmpl.yml /
ADD nginx.conf /etc/nginx/nginx.conf

ENV ADMIN_NAME=admin
ENV ADMIN_EMAIL=admin@php-censor.local
ENV ADMIN_PASSWORD=admin
ENV DB_HOST=localhost
ENV DB_TYPE=mysql
ENV DB_NAME=phpcensor
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ php-censor:
```

And specify admin user by these variables:

* ADMIN_NAME (**default: admin**)
* ADMIN_PASSWORD (**default: admin**)
* ADMIN_EMAIL (**default: admin@php-censor.local**)

### Docker compose

In progress
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export LOCAL_DB_HOST=$(echo $DB_HOST | awk -F ":" '{ print $1 }')
export LOCAL_DB_PORT=$(echo $DB_HOST | awk -F ":" '{ print $2; }')

[ ! -f ./app/config.yml ] && envsubst < /config.tmpl.yml > ./app/config.yml
./bin/console php-censor:migrate
./bin/console php-censor:install --config-from-file=yes --admin-name=$ADMIN_NAME --admin-password=$ADMIN_PASSWORD --admin-email=$ADMIN_EMAIL
nginx
php-fpm

0 comments on commit 129dd9d

Please sign in to comment.