simonwep / ocular-docker

Ready-to-use docker compose setup for ocular ✨
https://github.com/simonwep/ocular
10 stars 1 forks source link

Cant login after fresh isntall #3

Closed 24sevenUK closed 3 months ago

24sevenUK commented 5 months ago

Description

After doing docker compose up -d I'm able to navigate to the website, but when I try and login nothing happens and the cloud stays red with a line through it. Any data entered is lost when the page it reloaded.

In the logs I'm getting the following:- nginx-1 | 192.168.1.121 - - [27/May/2024:13:01:52 +0000] "POST /api/login HTTP/1.1" 200 29 "http://192.168.1.122:3030/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" nginx-1 | 192.168.1.121 - - [27/May/2024:13:01:52 +0000] "GET /api/user HTTP/1.1" 403 0 "http://192.168.1.122:3030/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" nginx-1 | 192.168.1.121 - - [27/May/2024:13:01:52 +0000] "GET /api/data/data HTTP/1.1" 401 0 "http://192.168.1.122:3030/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" nginx-1 | 192.168.1.121 - - [27/May/2024:13:01:52 +0000] "GET /api/data/settings HTTP/1.1" 401 0 "http://192.168.1.122:3030/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" nginx-1 | 192.168.1.121 - - [27/May/2024:13:01:52 +0000] "POST /api/logout HTTP/1.1" 401 0 "http://192.168.1.122:3030/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"

Environment

Have tried running on:-

Expected behaviour

Login to work as expected?

Steps to reproduce

Followed the instructions on https://github.com/simonwep/ocular-docker/blob/main/README.md

Additional info

No response

simonwep commented 5 months ago

Hey! :)

Any data entered is lost when the page it reloaded.

That is expected if you're not logged in.

Ubuntu VM with all my other docker containers Fresh Debian container

Have you tried running it without any other docker containers running? And what do you mean with "Fresh debian container"?

Followed the instructions on https://github.com/simonwep/ocular-docker/blob/main/README.md

When I do this it works. demo

Please provide all steps/information necessary to reproduce that. You skipped a whole lot of information there, the GIF is from a Apple M2 Pro with Docker 26.1.1. Maybe related to #2?

jd-apprentice commented 4 months ago

I'm running the same issue, i've tried to docker compose up -d, app is running fine but can't login. Also tried to run the ./gen-password then docker compose up -d --force-recreate and no case

backend-1 | {"level":"info","ts":1717633650.9648376,"caller":"core/config.go:71","msg":".env file skipped"}
backend-1 | {"level":"info","ts":1717633650.9722652,"caller":"core/config.go:71","msg":"build info","version":"v1.1.0","date":"2024-05-28T10:52:37+02:00","commit":"b1e14cd4e1c0d44 78a44c2c4c2447f65d9680e9a"}
backend-1 | {"level":"info","ts":1717633651.141634,"caller":"core/db.go:405","msg":"users","count":1}
backend-1 | {"level":"info","ts":1717633651.14185,"caller":"core/db.go:405","msg":"datasets","count":0}
backend-1 | {"level":"info","ts":1717633651.141909,"caller":"core/db.go:405","msg":"expired keys","count":0}
nginx-1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx-1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx-1 | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
nginx-1 | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx-1 | /docker-entrypoint.sh: Configuration complete; ready for start up

Edit:

In my case I made this to make it work ->

docker compose down
docker system prune --all

wget https://github.com/simonwep/ocular-docker/archive/refs/tags/v1.2.0.zip
unzip v1.2.0.zip
cd ocular-docker
cp .env.example .env
./gen-passwords.sh
docker compose up -d

In the previous attempt I made I cloned the repository and also ran docker compose up -d before running ./gen-passwords.

simonwep commented 4 months ago

@jd-apprentice

wget https://github.com/simonwep/ocular-docker/archive/refs/tags/v1.2.0.zip unzip v1.2.0.zip cd ocular-docker cp .env.example .env ./gen-passwords.sh docker compose up -d

Aren't these literally the setup instructions from this repo? https://github.com/simonwep/ocular-docker?tab=readme-ov-file#first-time-setup

In the previous attempt I made I cloned the repository and also ran docker compose up -d before running ./gen-passwords

Well, I wouldn't expect it to work if you don't follow the instructions 😅

Talha771 commented 4 months ago

IM having the same problem as the dude above, I've pruned and followed the instructions multiple times but it returns invalid creds

simonwep commented 3 months ago

Please open a new issue if you're having troubles getting this set up, this thread is getting to bloated :)