Skip to content

Commit

Permalink
docs: update default dev port; document env vars for manual prod setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragory committed Apr 7, 2024
1 parent ae03c9e commit bea3959
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Below you can find instructions for setting up the environment and getting start
4. Run `docker compose -f docker-compose.development.yml up` to start the development environment
5. In VSCode: Install the `Remote - SSH` plugin
6. In VSCode: Run `Remote-SSH: Connect to Host...`
* As the address, use `[email protected]:3002` (where `3002` matches `DEVELOPMENT_SSH_PORT` in `.env`)
* As the address, use `[email protected]:3022` (where `3022` matches `DEVELOPMENT_SSH_PORT` in `.env`)
* Use the password specified in `.env` as `DEVELOPMENT_SSH_PASSWORD`
7. In VSCode: Once connected, click `Open folder...` and select `/home/ubuntu/zeppelin`

Expand All @@ -35,7 +35,7 @@ Below you can find instructions for setting up the environment and getting start
5. Choose `Connect via SSH` and create a new connection:
* Username: `ubuntu`
* Host: `127.0.0.1`
* Port: `3002` (matching the `DEVELOPMENT_SSH_PORT` value in `.env`)
* Port: `3022` (matching the `DEVELOPMENT_SSH_PORT` value in `.env`)
6. Click `Check Connection and Continue` and enter the password specified in `.env` as `DEVELOPMENT_SSH_PASSWORD` when asked
7. In the next pane:
* IDE version: WebStorm, PHPStorm, or IntelliJ IDEA
Expand All @@ -49,12 +49,12 @@ Below you can find instructions for setting up the environment and getting start
4. Run `docker compose -f docker-compose.development.yml up` to start the development environment
5. Use the following credentials for connecting with your IDE:
* Host: `127.0.0.1`
* Port: `3002` (matching the `DEVELOPMENT_SSH_PORT` value in `.env`)
* Port: `3022` (matching the `DEVELOPMENT_SSH_PORT` value in `.env`)
* Username: `ubuntu`
* Password: As specified in `.env` as `DEVELOPMENT_SSH_PASSWORD`

## Starting the project
These commands are run inside the dev container. You should be able to open a terminal in your IDE after connecting.
These commands are run inside the dev container. You should be able to open a terminal in your IDE after connecting to the dev environment.

### 1. Install dependencies

Expand Down
17 changes: 15 additions & 2 deletions docs/PRODUCTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Zeppelin's production environment uses Docker. There are a few different ways to
2. Make a copy of `.env.example` called `.env`
3. Fill in the missing values in `.env` (including the "PRODUCTION - STANDALONE" section)

**Note:** The dashboard and API are exposed with a self-signed certificate. It is recommended to set up a proxy with a proper certificate in front of them. A popular option for this is [Cloudflare Tunnel](https://www.cloudflare.com/products/tunnel/).
**Note:** The dashboard and API are served insecurely over HTTP. It is recommended to set up a proxy with a TLS certificate in front of them. A popular option for this is [Cloudflare Tunnel](https://www.cloudflare.com/products/tunnel/).

### Running the bot
`docker compose -f docker-compose.standalone.yml up -d`
Expand Down Expand Up @@ -68,4 +68,17 @@ If you're using an application platform such as Railway, you can simply point it
For the start command, you can use the same commands as above: `npm run start-bot`, `npm run start-api`, `npm run start-dashboard`.
Make sure to also run migrations when you update the bot.

**Note:** You'll need to provide the necessary env variables. For example, `docker run --env-file .env zeppelin`
### Environment variables
You'll need to provide the necessary env variables in the manual setup. For example, `docker run -e NODE_ENV=production --env-file .env zeppelin`

The following env variables can be used to set up the database credentials:
* `DB_HOST`
* `DB_PORT`
* `DB_USER`
* `DB_PASSWORD`
* `DB_DATABASE`

The following env variable can be used to configure the API path prefix:
* `API_PATH_PREFIX`

Remember to always set `NODE_ENV` to `production` for production setups.

0 comments on commit bea3959

Please sign in to comment.