Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

local development environment, error in using webapp

12 views
Skip to first unread message

Stephane van Hardeveld

unread,
Jan 17, 2020, 6:49:49 AM1/17/20
to tools-...@lists.mozilla.org
Hi All,

I am trying to test socorro in a local test environment, and follow the
documentation on
https://socorro.readthedocs.io/en/latest/localdevenvironment.html
I am able to build the complete environment via:

make my.env
make build
make runservices
make setup
make upatedata
docker-compose up -d oidcprovider
docker-compose exec oidcprovider /code/manage.py createuser <user info>
docker-compose run app shell ./webapp-django/manage.py makesuperuser <user
mail> docker compose up webapp

Connecting to localhost:8000 fails however with (ultimately) a permission
denied in
/app/webapp-django/crashstats/crashstats/static/crashstats/css/<tmpfilename>

Starting webapp with interactive shell shows all directories in /app are
owned by user '1000'. This user is not known inside the docker image, the
user app has uid 10001

After changing the Socorro_uid and gid into 10001, I rebuilt all via make
build etc. But still the /app directory is owned by user with id 1000.

I suppose I can solve this by changing permissions or owner via root (how
can I become root in the webapp docker image?), but I probably made another
mistake somewhere else. Any help is appreciated!

Kind regards,
Stephane van Hardeveld


William Kahn-Greene

unread,
Jan 17, 2020, 9:06:50 AM1/17/20
to Stephane van Hardeveld, tools-...@lists.mozilla.org
Hi Stephane!

I have two thoughts.

First, what operating system are you using?

Second, when you did "make build" the second time, did it use cached
Docker layers or did it go through and rebuild everything from
scratch?

/will
> _______________________________________________
> tools-socorro mailing list
> tools-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/tools-socorro

hardevel...@gmail.com

unread,
Jan 17, 2020, 9:09:22 AM1/17/20
to
Some more info:
Seems the user id which is reflected in the webapp image is the same as my user id in my host machine. I will try building the environment again with setting uid and gid in my.emv to 1000. This should become the uid:gid of the app user I assume?

hardevel...@gmail.com

unread,
Jan 17, 2020, 9:13:01 AM1/17/20
to
Hi Will,

I use Ubuntu 19.04, with latest docker and docker-compose 1.21

Regards,
Stephane

Op vrijdag 17 januari 2020 15:06:50 UTC+1 schreef William Kahn-Greene:

Stephane van Hardeveld

unread,
Jan 17, 2020, 9:24:32 AM1/17/20
to tools-...@lists.mozilla.org
In that light, the Dockerfile used in making all Docker images contains a line I do not understand:
RUN chown -R app.app /mdsw /stackwalk (line 39)

Shouldn't that be:
RUN chown -R app:app /mdsw /stackwalk
?

William Kahn-Greene

unread,
Jan 17, 2020, 9:28:50 AM1/17/20
to Stephane van Hardeveld, tools-...@lists.mozilla.org
That's a bug! If you want, write up a bug report and a pull request
and I can land those today. Otherwise I can get to fixing this next
week.

Thank you for the heads up!

On Fri, Jan 17, 2020 at 9:24 AM Stephane van Hardeveld

Stephane van Hardeveld

unread,
Jan 17, 2020, 9:42:04 AM1/17/20
to William Kahn-Greene, tools-...@lists.mozilla.org
You are most welcome ;-)

I retested with changing socorro_uid and Socorro_gid in my.env into my user id. This solved my problem, the app folder in the webapp image now has the uid:gid of the user app
Not sure if this is a bug as well, or a bug in docker itself?

If you think you do not come round to fixing the chown bug below next week, I will write a bug report on Monday.

Thanks, and have a nice weekend

Regards,
Stephane

Stephane van Hardeveld

unread,
Jan 20, 2020, 3:40:21 AM1/20/20
to William Kahn-Greene, tools-...@lists.mozilla.org
Hi Will,

Created a bug report:
Bug 1610249

Thanks,
0 new messages