CJWorkbench / cjworkbench

The data journalism platform with built in training
http://workbenchdata.com
Other
304 stars 45 forks source link

Creating a user when using a docker image #271

Closed lvrysis closed 2 years ago

lvrysis commented 2 years ago

Dear all,

I want to run and test cjworkbench for academic purposes. I run a docker image found here: https://hub.docker.com/r/cjworkbench/cjworkbench-main

but I can't login... is there any superuser already present there? I run the "bin/dev python ./manage.py createsuperuser" command into the docker image successfully but I can't run the "bin/dev sql -c 'UPDATE account_emailaddress SET verified = TRUE'" to verify my user. It says "sql command not found". Is there anything else I can do? I found these commands here: https://github.com/CJWorkbench/cjworkbench/wiki/Setting-up-a-development-environment

Thanks in advance, Lazaros Vrysis M3C Research Group m3c.web.auth.gr

adamhooper commented 2 years ago

Hi there,

Great question! Could you please share a log of your terminal sessions -- the input commands and printed outputs? The exact phrasing of error messages is important here.

lvrysis commented 2 years ago

Thank you for the reply! I attach a screenshot of where the aforementioned issue occurs.

anydesk00009

In addition to this, the signup function does not work. Is this docker image a dev environment with the signup disabled? Should an e-mail have been arrived at the inbox of the email used for creating the superuser?

anydesk00008

adamhooper commented 2 years ago

@lvrysis It looks like you're trying to run bin/dev within a "docker exec". This isn't something we support. bin/dev can't run within a Docker container. It must be run outside one.

I see that you're on Windows and I don't quite know where to go from here. If you figure this out, please write up your process and we can add to the docs!

lvrysis commented 2 years ago

OK, but how can I create a user? I can also deploy the docker image to a linux-based host OS. What will be the difference? The docker container is supposed to be host-OS-agnostic (I suppose). I try to run the commands within the docker container to enable somehow a user.

adamhooper commented 2 years ago

@lvrysis I'm afraid all this is in the docs. There are a couple of places where your attempts deviate from the docs:

lvrysis commented 2 years ago

I have found the e-mail confirmation links inside a log file in the local_mail folder. I have enabled the user.

How can I add new users? This URL (http://localhost:8001/signup_closed_test) appears when hitting the "Sign Up" button in the welcome screen, as follows:

anydesk00010

adamhooper commented 2 years ago

But the address in the addressbar is wrong. This is not what you get when you run bin/dev.

I don't know what you are doing, but it isn't in the documentation.

I'm exhausted these days (new father here!). We've watched the docs at https://github.com/CJWorkbench/cjworkbench/wiki/Setting-up-a-development-environment work for dozens (possibly hundreds) of people. You and I, @lvrysis, are having communication problems. Don't be disheartened ... but please find somebody else to help you follow the docs. (You won't find them in this GitHub team.)

lvrysis commented 2 years ago

This is what I get when I run this image: "docker pull cjworkbench/cjworkbench-main". It is 3 years old, so maybe this is the problem.

I do not run the "github" project directly to my machine. I only run the docker image.

lvrysis commented 2 years ago

I think that I have managed to create a working docker container but I still have some issues that I have to solve before pushing to the docker hub. The most importart is why there are no functions available? For example, there are no options for loading data...

anydesk00013