Setup your config/local.js to something like, to test the .ssh keys generation, and assh config generation:
module.exports = {
sshDir: '/data/la-toolkit/.ssh/',
asshDir: '/data/la-toolkit/.ssh/assh.d/',
projectsDir: '/data/la-toolkit/config/',
logsDir: '/data/la-toolkit/logs/',
baseBrandingLocation: '/data/la-generator/base-branding',
preCmd: 'docker exec -u ubuntu la-toolkit-dev',
ttydMinPort: 20011,
ttydMaxPort: 20100,
};
};
The ttyd ports configuration should match the la-toolkit docker compose ports configuration.
Note: in development the container is named la-toolkit-dev (service under
profiles: [dev] in la-toolkit's docker-compose.yml, started with
docker compose --profile dev up -d). In production the container is named la-toolkit,
and preCmd is empty there (see below) because the backend runs inside that container.
In production, the previous variables are specified in config/env/production.js:
sshDir: '/home/ubuntu/.ssh/',
asshDir: '/home/ubuntu/.ssh/assh.d/',
projectsDir: '/home/ubuntu/ansible/la-inventories/',
baseBrandingLocation: '/home/ubuntu/base-branding',
preCmd: '',
ttydMinPort: 2011,
ttydMaxPort: 2100,
And match the directories of the la-toolkit dockerfiles.
First an environment variable with your mongo db url:
export DATABASE_URL=mongodb://la_toolkit_user:la_toolkit_changeme@localhost:27017/la_toolkitthe user/password should match the values in your la-toolkit docker-compose.yml.
During development you can run sails with forever to easy reload with code changes
npm install -g forever
forever -w app.jsOr without forewer and watch just:
sails lift- Weakness icon created by Freepik - Flaticon