Expected behavior
I expect to be able to find complete documentation about how to create a new development environment.
Actual behavior
The documentation that I can find is unclear and / or incomplete.
Here are the steps that I have taken:
- navigate to project settings => environments and then click the “add new environment” button.
- provide an environment name (DEV-Developer) and a URL (http://localhost:3310)
- see the “environment secret”
Now what?
I’m unclear about the arguments to provide to either the docker-based or npm-based install.
For the docker-based install, the document describes a “FOREST_TOKEN” argument. Providing the environment secret as the “FOREST_TOKEN” fails with a message that the project already exists. I can’t find any documentation for any flags that would specify that this is a new environment for an existing project.
The NPM install process consistently fails to connect to my database. I’ve installed psql and confirmed that I can connect with the same connection parameters. My postres database is running in docker and I can connect to it with the hostname “0.0.0.0” or “localhost” or “host.docker.internal” but each of these result in the “Connecting to your database” message being displayed indefinitely from the “lumber generate” command.
I’ve also tried creating a completely new project (via the docker install method) and then trying to edit the .env file to point to my desired project but also without success.
Failure Logs
Try to use the docker run command to do an install for the new environment:
docker run \
-v
pwd
:/usr/src/app --init
-e DATABASE_URL=postgres://postgres:postgrespassword@host.docker.internal:5432/postgres
-e APP_NAME=cm-admin-proto
-e FOREST_EMAIL=jesse@canada-market.com
-e FOREST_TOKEN={ENVIRONMENT SECRET HERE}
-ti forestadmin/lumber-forestadmin
Fails as follows:
e[Ke[?25h/usr/local/bin/lumber → /usr/local/lib/node_modules/lumber-cli/lumber.js
- lumber-cli@2.7.3
updated 1 package in 4.234s
e[33m>e[39m Environment variable usage detected:
e[33m>e[39m - DATABASE_URL
e[33m>e[39m Environment variables are DEPRECATED and will be removed in the future major Lumber version. Please use command parameters instead.
e[33m>e[39m Typelumber help
for more information.
e[31m>e[39m The directory e[31m/usr/src/app/cm-admin-protoe[39m already exists.
e[31m>e[39m Please retry with another project name.
Context
Please provide any relevant information about your setup.
- Package Version:?
- Express Version:“~4.16.3”
- Sequelize Version:“~5.15.1”
- Database Dialect:“pg”: “~6.1.0”
- Database Version:“pg”: “~6.1.0”
- Project Name:“cm-admin-proto”