vicalloy / outline-docker-compose

Install a self-hosted Outline wiki instance in a couple of minutes
BSD 3-Clause "New" or "Revised" License
738 stars 120 forks source link

Make install with "Waiting for nginx" #75

Open JoannaAtZipline opened 6 months ago

JoannaAtZipline commented 6 months ago

On a fresh Ubuntu 22.04 LTS install with docker compose freshly installed, make install, the script hangs on waiting for nginx :

cd ./scripts && bash ./main.sh init_cfg
docker compose up -d
[+] Running 5/5
 ✔ Container outline-docker-compose-wk-redis-1        Started                                                                                                                                                 0.0s 
 ✔ Container outline-docker-compose-wk-postgres-1     Started                                                                                                                                                 0.0s 
 ✔ Container outline-docker-compose-wk-oidc-server-1  Started                                                                                                                                                 0.0s 
 ✔ Container outline-docker-compose-wk-outline-1      Started                                                                                                                                                 0.0s 
 ✔ Container outline-docker-compose-wk-nginx-1        Started                                                                                                                                                 0.0s 
cd ./scripts && bash ./main.sh reload_nginx
2023/12/31 19:14:51 [notice] 37#37: signal process started
sleep 1
docker compose exec wk-oidc-server bash -c "make init"
python manage.py creatersakey
RSA key successfully created with kid: b6a3be0d13c7d949aa53c2f7288ac8cc
python manage.py createsuperuser
Username: joanna
Email address: fake-email@gmail.com
Password: ----------------
Password (again): -----------------
Superuser created successfully.
docker compose exec wk-oidc-server bash -c "python manage.py loaddata oidc-server-outline-client"
Installed 1 object(s) from 1 fixture(s)
cd ./scripts && bash ./main.sh reload_nginx
2023/12/31 19:15:16 [emerg] 59#59: host not found in upstream "wk-outline" in /etc/nginx/conf.d/default.conf:9
nginx: [emerg] host not found in upstream "wk-outline" in /etc/nginx/conf.d/default.conf:9
waiting nginx
{. . . infinitely . . .}

When visiting 127.0.0.1:8888, ngingx shows 502 - bad gatway

Docker container statuses:

CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS                           PORTS                    NAMES
9c78e73123b6   nginx                          "/docker-entrypoint.…"   55 minutes ago   Up 6 minutes                     127.0.0.1:8888->80/tcp   outline-docker-compose-wk-nginx-1
f0cfe180c729   outlinewiki/outline:0.72.0-3   "docker-entrypoint.s…"   55 minutes ago   Restarting (126) 6 seconds ago                            outline-docker-compose-wk-outline-1
2e6f86796a0a   redis:latest                   "docker-entrypoint.s…"   55 minutes ago   Up 6 minutes                     6379/tcp                 outline-docker-compose-wk-redis-1
61798478f1a9   vicalloy/oidc-server           "make run"               55 minutes ago   Up 6 minutes                     8000/tcp                 outline-docker-compose-wk-oidc-server-1
65449f3b30c7   postgres:15.2-alpine3.17       "docker-entrypoint.s…"   55 minutes ago   Up 6 minutes                     5432/tcp                 outline-docker-compose-wk-postgres-1
➜  outline-docker-compose git:(master) ✗ 

What might I be missing?

tarunkumar519 commented 6 months ago

Are you able to solve this?

Alvinst commented 6 months ago

I don't know if Joanna fixed it or not, but apparently something was wrong with her nginx.conf Specifically:

2023/12/31 19:15:16 [emerg] 59#59: host not found in upstream "wk-outline" in /etc/nginx/conf.d/default.conf:9 nginx: [emerg] host not found in upstream "wk-outline" in /etc/nginx/conf.d/default.conf:9

Seryta commented 1 month ago

:( any updates ?

Seryta commented 1 month ago

At first, I set upstream separately according to the error message. Although I didn't quite understand why this happened, I later found out that it was not the reason. I found that this is not the real reason, the real reason is that the service does not start normally, so the error cannot find the host, it just needs other services to run normally