Skip to content

Conversation

@jubianchi
Copy link

This PR will help automating the Flarum install process. Actually, to bootstrap the initial configuration file the user has to fire a CLI command (php flarum install [--defaults]) which either asks the user to type values or fetch them from a default provider.

With this patch, we have a new provider: DataFromEnvironment. It will read the configuration from environment variables:

export FLARUM_DATABASE_HOST=mysql.local
export FLARUM_DATABASE_NAME=flarum
export FLARUM_DATABASE_USER=flarum
export FLARUM_DATABASE_PASSWORD=flarum
export FLARUM_ADMIN_USERNAME=admin
export FLARUM_ADMIN_PASSWORD=admin
export FLARUM_ADMIN_EMAIL=admin@docker-fl
export FLARUM_FORUM_TITLE=Docker Flarum
export FLARUM_BASE_URL=http://flarum.local

php flarum install --env

This is really useful to provide an automated install for docker for example.

@jubianchi
Copy link
Author

I'm thinking of a better solution right now, let me implement it ;)

@jubianchi
Copy link
Author

This was a bad idea. sorry for the noise!

@jubianchi jubianchi closed this Sep 1, 2015
@franzliedke
Copy link
Contributor

That's actually a very interesting idea. :)

@jubianchi
Copy link
Author

@franzliedke in fact it is but the way I did it was not clean enough to me. I'm experimenting it with an other method and it seems to be ok and does not require any modification in the core ;)

@Mecvak
Copy link

Mecvak commented Sep 1, 2015

This would be extremely useful for installing by script. Hopefully this new idea still utilizes environmental variables!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants