PaddiM8 / Planera

A simple ticket-based project management web application
MIT License
10 stars 1 forks source link

Default admin password ? #3

Open Al3x360 opened 3 months ago

Al3x360 commented 3 months ago

Hi i tried to deploy planera on my docker instance, i did it trough Portainer, this is OK but when i try to access the web interface, i'm facing a login screen . I tryed to use register button but no account is created . Do you have a default password access ?

PaddiM8 commented 3 months ago

You should be able to create an account and it should log you in right after creating an account (unless you enabled email confirmations). Are you sure that registration is enabled? You can verify this by checking that PLANERA_DISABLEREGISTRATION is set to false in the docker compose file. Not sure what the problem is otherwise. Maybe it can't connect to the database? Do the logs say anything

Al3x360 commented 3 months ago

thanks for the reply, unfortunatelly, the logs dont tell anything that would not be correct. in fact, when i try to create an account, the button turns grey, then become blue again then does nothing . i'm using Portainer stack to pilot this deployement. PLANERA_DISABLEREGISTRATION is set to false then email verification is set to false too. i'm using it locally atm,: i used the same file you provided on the github

logs form caddy :

INF ts=1716811770.0852175 msg=using provided configuration config_file=/etc/caddy/Caddyfile config_adapter=caddyfile WRN ts=1716811770.0859077 msg=Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies adapter=caddyfile file=/etc/caddy/Caddyfile line=2 INF ts=1716811770.0864394 logger=admin msg=admin endpoint started address=localhost:2019 enforce_origin=false origins=["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"] INF ts=1716811770.0866432 logger=tls.cache.maintenance msg=started background certificate maintenance cache=0xc000593c80 INF ts=1716811770.0868943 logger=http.log msg=server running name=srv0 protocols=["h1","h2","h3"] INF ts=1716811770.0871434 msg=autosaved config (load with --resume flag) file=/config/caddy/autosave.json INF ts=1716811770.0871494 msg=serving initial configuration INF ts=1716811770.0895257 logger=tls msg=cleaning storage unit storage=FileStorage:/data/caddy INF ts=1716811770.0897403 logger=tls msg=finished cleaning storage units

logs from DB : PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-05-27 12:09:29.943 UTC [1] LOG: starting PostgreSQL 15.7 (Debian 15.7-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit 2024-05-27 12:09:29.943 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2024-05-27 12:09:29.943 UTC [1] LOG: listening on IPv6 address "::", port 5432 2024-05-27 12:09:29.988 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2024-05-27 12:09:30.070 UTC [29] LOG: database system was shut down at 2024-05-27 12:07:18 UTC 2024-05-27 12:09:30.130 UTC [1] LOG: database system is ready to accept connections 2024-05-27 12:14:30.170 UTC [27] LOG: checkpoint starting: time 2024-05-27 12:14:31.307 UTC [27] LOG: checkpoint complete: wrote 11 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.837 s, sync=0.115 s, total=1.138 s; sync files=4, longest=0.089 s, average=0.029 s; distance=17 kB, estimate=17 kB

logs from planera api : info: Microsoft.EntityFrameworkCore.Database.Command[20101] Executed DbCommand (38ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT EXISTS ( SELECT 1 FROM pg_catalog.pg_class c JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace WHERE n.nspname='public' AND c.relname='EFMigrationsHistory' ) info: Microsoft.EntityFrameworkCore.Database.Command[20101] Executed DbCommand (29ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] SELECT "MigrationId", "ProductVersion" FROM "EFMigrationsHistory" ORDER BY "MigrationId"; warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60] Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] No XML encryptor configured. Key {13df97f3-ad84-41f2-95b8-a5c62ad065ea} may be persisted to storage in unencrypted form. warn: Microsoft.AspNetCore.Server.Kestrel[0] Overriding address(es) 'http://*:8080'. Binding to endpoints defined via IConfiguration and/or UseKestrel() instead. info: Microsoft.Hosting.Lifetime[14] Now listening on: http://0.0.0.0:5065 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Production info: Microsoft.Hosting.Lifetime[0] Content root path: /app/data

log for web : Listening on 0.0.0.0:3000

i tried chrome 125.0.6422.77 , firefox 126.0 (64 bits) , edge Version 125.0.2535.67, and opera . This is the same reaction.

Animation

PaddiM8 commented 3 months ago

That's odd. Does the browser console say anything? ctrl+shift+i

Al3x360 commented 3 months ago

yes i did not think about running the console from web browser : it says that POST is forbidden with error 403.


start.16f2e4dc.js:1
POST http://10.1.1.251:2000/register 403 (Forbidden)
  | window.fetch | @ | start.16f2e4dc.js:1 -- | -- | -- | --   | l | @ | Form.9bd58095.js:1

the error says : const fe = window.fetch; window.fetch = (n,o)=>((n instanceof Request ? n.method : (o == null ? void 0 : o.method) || "GET") !== "GET" && ne.delete(Ee(n)), fe(n, o));

PaddiM8 commented 2 months ago

I had this issue too when accessing it like you did. It works when I access it through a domain though (and set the ORIGIN environment variable in docker compose to that domain).

In this case, ORIGIN would have to be your IP + the port. Might work.