Commit 0d22417c authored by xtof's avatar xtof

ok

parent 1438ac7b
Pipeline #154586 passed with stage
in 2 seconds
......@@ -165,4 +165,41 @@ OLKI_WEBSERVER_HOST="http://127.0.0.1:5000" sudo -E docker-compose -f olkitoto.y
```
And you may now point any browser to http://olki.toto.fr !
## Troubleshooting
You may launch the docker-compose command without the final "-d" to see in your terminal the logs.
### "olki" cannot connect to "postgresql"
This is likely due to a configuration problem either in your .env, or in your docker-compose.yml .
Here are a few explanations about how everything should work, to help you identify the erroneous config:
- docker-compose creates an internal network between your containers, and in particular the postgres and olki containers; each container in this network can be accessed by its name, e.g., "olki" and "postgres" (defined in docker-composer.yml)
- the postgres container exposes in this internal network the database on the standard 5432 port
- so the olki container shall access the database at hostname "postgres" and port "5432": this should be defined in your .env, which should look like this:
```
DATABASE_URL=postgresql://olki:olki@postgres/olki
CACHE_URL=redis://redis:6379
OLKI_WEBSERVER_HOST=localhost
OLKI_WEBSERVER_PORT=443
OLKI_WEBSERVER_HTTPS=true
# If you need more than one IP as trust_proxy
# pass them as a comma separated array:
OLKI_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16"]
#OLKI_SMTP_USERNAME=
#OLKI_SMTP_PASSWORD=
OLKI_SMTP_HOSTNAME=postfix
OLKI_SMTP_PORT=25
OLKI_SMTP_FROM=noreply@domain.tld
OLKI_SMTP_TLS=false
OLKI_SMTP_DISABLE_STARTTLS=false
OLKI_ADMIN_EMAIL=cerisara@loria.fr
```
- In this .env, the first line defines the env variable that olki uses to access the db; the port is not given because it's the standard 5432 port; the "@postgres/" indicates the "hostname" of the container with the db;
- note that the internal network across containers has IP "172.18.0.X"
- if your .env looks correct, then double check that docker-compose is using **the correct .env file**: this is in the file docker-composer.yml, at the line: "source: ../../.env"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment