Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.64 KB

SETUP.md

File metadata and controls

48 lines (31 loc) · 1.64 KB

Starting a project

Locally (DEV)

In the root folder, copy the file configuration.json.dist to configuration.json and fill it with your values. The MySQL credentials are visible in the docker-compose.yml in the root folder.

Next, just do a make start, and then run make test to run the tests and import the local DB with test features. You're good to go!

Ther test DB it just imported has a user. You can login with the following credentials :

  • username: mephistophelesz
  • password: barz

Production

Reminder: the empty database contains a default user. Credentials are:

  • username: foo
  • password: bar

Change them as soon as your project is running!

The usual process to setup a project is the following:

  • Import the empty database (available at the root of the folder).
  • Run all the migrations (see here)
  • Deploy the code.
  • Configure the application.
  • Start the application.
  • Change your default credentials.

1- Importing the dabase

Nothing much to say here, import the empty database in to your MySQL server.

2- Deploying the code.

Same here: just upload the code on your server.

3- Configuring the application

In the root folder, copy the file configuration.json.dist to configuration.json and fill it with your values.

4- Starting the application

Make your gunicorn server to launch the application app.py.

5- Change your default credentials

As explained above, change your password and you username and email. Then, using the POST /user/1 endpoint, change your credentials, and the user/renew-token to change your token. More information is available in the API documentation.