mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +00:00
Merge pull request #108 from adrianmarinwork/main
Updated the start developing guide as suggested in issue #75
This commit is contained in:
@@ -16,17 +16,52 @@ cd infisical
|
|||||||
|
|
||||||
## Set up environment variables
|
## Set up environment variables
|
||||||
|
|
||||||
Tweak the `.env` according to your preferences. Refer to the available [environment variables](/self-hosting/configuration/envars).
|
Before running the docker-compose we have to generate the .env file with the environment variables, you can create your own file or start with the
|
||||||
|
`.env.example` as an example guide.
|
||||||
|
|
||||||
|
Mandatory variables in the `.env` file:
|
||||||
|
|
||||||
|
1. Keys and JWT variables
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The `.env.example` has these variables empty, you can self generate the `JWT and ENCRYPTION_KEY` with this [32-byte random hex strings generator](https://www.browserling.com/tools/random-hex).
|
||||||
|
|
||||||
|
For the `PRIVATE_KEY and PUBLIC_KEY` you can use the ones shown in the screenshot:
|
||||||
|
|
||||||
```bash
|
|
||||||
cp .env.example .env
|
|
||||||
```
|
```
|
||||||
|
PRIVATE_KEY='oGVv5rThrpZ7WLgQW27chY1cXngr4wLQIZnGfSKgHPk='
|
||||||
|
PUBLIC_KEY='ldr6JaC7AY+tun3omGLdE4SWpkJbtVBOI54KfUP53Xc='
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Mongo variables and site URL
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
These variables are used to connect the MongoDB and set the URL for the localhost.
|
||||||
|
|
||||||
|
For development, you can use `root` for the `MONGO_USERNAME` and `example` for the `MONGO_PASSWORD` as shown in the screenshot.
|
||||||
|
|
||||||
|
Take into account that if you use your own `MONGO_USERNAME` and `MONGO_PASSWORD`, you also have to change the `MONGO_URL` with the form of `MONGO_USERNAME:MONGO_PASSWORD` after the `//` part of the URL.
|
||||||
|
|
||||||
|
3. Mail SMTP service variables
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
These variables are needed to use the Mail SMTP service that takes care of sending the verification code when you
|
||||||
|
register in the app.
|
||||||
|
|
||||||
|
For the `SMTP_USERNAME` variable, you will need an email with 2-steps-verification.
|
||||||
|
|
||||||
|
For the `SMTP_PASSWORD` variable, you will need to [generate an app password](https://support.google.com/mail/answer/185833?hl=en) with the email you used in the `SMTP_USERNAME` variable.
|
||||||
|
|
||||||
|
With this environment variables, you will be ready to run the docker-compose.
|
||||||
|
|
||||||
## Docker for development
|
## Docker for development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# build and start the services
|
# build and start the services
|
||||||
docker-compose -f docker-compose.dev.yml up --build
|
docker-compose -f docker-compose.dev.yml up --build --force-recreate
|
||||||
```
|
```
|
||||||
|
|
||||||
Then browse http://localhost:8080
|
Then browse http://localhost:8080
|
||||||
|
|||||||
Reference in New Issue
Block a user