Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on docs - Unable to use docker-compose to build self-hosted app. #1767

Open
leonballoni opened this issue Apr 30, 2024 · 2 comments
Open

Comments

@leonballoni
Copy link

leonballoni commented Apr 30, 2024

Morning, Trying to setup self-hosted service using docker-compose. While preparing the environment, there is a error when fetching with curl or wget the .env.example from github.
.env_file: 404: Not Found -> curl -o .env_test https://raw.githubusercontent.com/Infisical/infisical/main/.env.example

Whilst that occurred I searched along the documentation for the proper envs and used the following as a test:

.env
`
REDIS_URL=redis://localhost:6379

DB_CONNECTION_URI=postgres://infisical:infisical@localhost/infisical?sslmode=disable

AUTH_SECRET=4bnfe4e407b8921c104518903515b218

ENCRYPTION_KEY=4bnfe4e407b8921c104518903515b218

POSTGRES_USER=infisical

POSTGRES_PASSWORD=infisical

POSTGRES_DB=infisical
`

Receiving the following error when trying to access the db:
image

Thereafter I tried to change the compose script at db to directly define environments fro POSTGRES_* (USER, PASSWORD and DB) and got the same errors.
Also tried changing the DB_CONNECTION_URI to:
DB_CONNECTION_URI=postgres://infisical:infisical@localhost/infisical?sslmode=disable
or
DB_CONNECTION_URI=postgres://infisical:infisical@127.0.0.1/infisical?sslmode=disable
or
DB_CONNECTION_URI=postgres://infisical:infisical@db/infisical?sslmode=disable
or
DB_CONNECTION_URI=postgres://infisical:infisical@infisical-db/infisical?sslmode=disable

Please, could you help me out to fix the issue? Is there any .envs lacking or wrong?

image

Thanks

Files:
infisical-docker-compose-files.zip

Path: /self-hosting/deployment-options/docker-compose

@leonballoni leonballoni changed the title Issue on docs Issue on docs - Unable to use docker-compose to build self-hosted app. May 2, 2024
@akhilmhdh
Copy link
Member

Hey @leonballoni

I am bit confused from your statement. .env.example The link you have shared is the right one. I am getting the values from there and also the curl command is working correct. I just tested it out.

Screenshot 2024-05-14 at 3 31 14 PM

The issue is your REDIS_URL is localhost. It should be your docker compose redis service name. If your using Infisical unmodified docker compose file then its redis:6379 and not localhost

@leonballoni
Copy link
Author

@akhilmhdh Thank you for replying. I believe that the curl path must have been fixed in the last few weeks. I`m going to remake my steps and check if I missed anything and forgot to reply here.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants