Skipping the configuration wizard after installation

I’m writing an Ansible playbook to deploy discourse automatically. The problem is that I would like to automate the configuration that is done in the web browser after the installation. This would make it so that things like forum name, color, icon, etc would be configurable through the Ansible playbook instead of through the web installer. I can’t find any documentation on how to do this, is it possible?

I’m pretty sure you could set the hidden site setting wizard_enabled to false and this will prevent the wizard from displaying …

… obviously you can set this and other settings via API calls as one option.

2 Likes

I’ve been thinking about that a little, and have started a couple times to use Ansible rather than my set of shell scripts, but I’ve not quite gotten over the hump.

You could do stuff like that with the API, but you can’t use the API until you get an API key. To get an API key, you need to either use the web interface or (and I haven’t tested this) enter the container and issue a console command to generate and return the API key.

@pfaffman do your scripts do any customization after the initial deployment? One of the things we’re trying to do with this ansible script is to customize the UI and install custom plugins, without having to click-click on anything.

1 Like

Plugins, I’ve got scripted. Not hard to edit the app.yml file and rebuild.

Aha! It might be possible to create a template that would give console commands to set and get an API key, and then Bob’s your uncle.

2 Likes

Yeah a lot can be done here with custom commands:
https://github.com/discourse/discourse_docker/blob/master/samples/standalone.yml#L94-L96

1 Like

Did you find a solution to this?