shurco / litecart

🛒 litecart - shopping cart in 1 file with card and cryptocurrency payment support
MIT License
172 stars 33 forks source link

🤗 [Question]: admn credentials docker #80

Closed coderofsalvation closed 8 months ago

coderofsalvation commented 8 months ago

first of all thank you for this project

Question Description

Is it possible that the docker image isn't primed with admin data? Even after running the docker init or restarting I can't seem to login with user@email.com / Pass123

error:

🛒 litecart - open source shopping-cart in 1 file
├─ Cart UI: http://0.0.0.0:8080/
└─ Admin UI: http://0.0.0.0:8080/_/
{"level":"info","latency":"1.511822ms","status":200,"method":"GET","url":"/_/signin","time":1704103392,"message":"Success"}
{"level":"error","caller":"/home/runner/work/litecart/litecart/internal/handlers/private/auth.go:36","error":"user with the given email is not found","time":1704103400}
{"level":"error","latency":"16.248537ms","status":500,"method":"POST","url":"/api/sign/in","time":1704103400,"message":"Server error"}

shellscript to reproduce:

test -d lc_base || {
  mkdir -p lc_base lc_digitals lc_uploads site || true
  docker run \
    -v ./lc_base:/lc_base \
    -v ./lc_digitals:/lc_digitals \
    -v ./lc_uploads:/lc_uploads \
    -v ./site:/site \
    --rm shurco/litecart:latest init
}

docker run -d \
  --name litecart \
  --restart unless-stopped \
  -p '8090:8080' \
  -v ./lc_base:/lc_base \
  -v ./lc_digitals:/lc_digitals \
  -v ./lc_uploads:/lc_uploads \
  -v ./site:/site \
  shurco/litecart:latest

Checklist:

coderofsalvation commented 8 months ago

nevermind, the user@email.com/Pass123 from the docs got me confused (error is on my side). The right sequence is: