In pushkin-sitetemplate-default
v.2.0.0, we made some changes to the configuration files to improve security and allow for future upgrades. v3+ of the CLI assumes these changes. To use the new CLI and to benefit from these changes, please make the following quick adjustments:
Make a temporary copy of pushkin/front-end/src/config.js
with the [New version].
Replace pushkin/front-end/src/config.js
with the [New version]
Make a temporary copy of pushkin.yaml
.
Replace pushkin.yaml
with [New Version]
Restore any customization you had made to pushkin.yaml
by comparing your temporary copy with the new version. Most likely, the only customization you would have done is changing DockerHubID
.
Look at your temporary copy of config.js
. You will see that the settings in config.js
have all moved to the config
section of pushkin.yaml
. Please edit pushkin.yaml
to reflect any such customization. For instance, if you changed your email from me@mydomain.com
to an actual email address, update it.
For each experiment:
experiments/[YOUR EXPERIMENT]/web page/src/index.js
. On line 40, you should see:await pushkin.connect('/api/[YOUR EXPERIMENT]');
Replace this with
await pushkin.connect(this.props.api);
and save.
[path-to-experiment]/api controllers/
Run:
$ yarn upgrade pushkin-api --latest
[path-to-experiment]/worker/start.sh
. Replace everything with:#!/bin/bash
echo "Worker started. Waiting for rabbitMQ"
AMQP_DOMAIN=$(echo $AMQP_ADDRESS | sed -e "s/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/")
echo "Waiting for port 5672 on $AMQP_DOMAIN"
while ! nc -z $AMQP_DOMAIN 5672; do sleep 3; done
echo "Rabbitmq loaded"
node index.js
pushkin/front-end/src/components/Quizzes/TakQuiz.js
. Add a new line at the very top:import { CONFIG } from '../../config';
Then, on line 24, you should see:
<QuizComponent {...this.props} />
replace this with
<QuizComponent {...this.props} api={CONFIG.apiEndpoint.concat('/').concat(match.params.quizName)} />
and save.
pushkin/api
. Run:$ yarn upgrade pushkin-api --latest
$ pushkin setup-transaction-db