Configure

The configuration procedure of Yogosell for Docker is almost identical to the configuration procedure of Yogosell for Node.js.

Change the database

The databases are stored in the db folder of the docker-yogosell project. The folder contains two databases:

  • demo.sqlite,
  • db.sqlite,

db.sqlite is the empty database.

The docker-yogosell project contains the app/.env.js file. This file contains:

const env = {
  // Define here the credentials to access your database. This hidden file
  // is declared not to be exported in '.gitignore'.
  db: {
    active: 'sqlite',
    sqlite: {
      database: '../db/db.sqlite',  // <----- change the database here!
      testdb: 'the path to sqlite test database',
    },
    mysql: {
      host: 'the server domain name',
      connectionLimit: 'the number of simultaneous connections (number)',
      database: 'the database name',
      testdb: 'the test database name',
      user: 'the username with the privileges to access to the database',
      password: 'the username password',
    },
  },
};

Replace ../db/demo.sqlite by ../db/db.sqlite.

Stop the container, destroy it and delete the docker image (we assume you know how to proceed).

Rebuild an image and restart a container (see previous chapter).

Change protocol and/or port

The procedure is the same as for Node.js. Open the file app/server/config.js and apply the same modifications.

Then, rebuild a new image (the same as above).

-- oOo --