Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Something wrong with your containers #5

Closed
icinsight opened this issue May 30, 2019 · 6 comments · May be fixed by #6
Closed

Something wrong with your containers #5

icinsight opened this issue May 30, 2019 · 6 comments · May be fixed by #6
Assignees

Comments

@icinsight
Copy link

I get "403 Forbidden nginx/1.15.12 error"

nginx_1 | 2019/05/30 02:23:55 [error] 6#6: *7 directory index of "/usr/share/nginx/html/" is forbidden, client: 24.215.98.192, server: localhost, request: "GET / HTTP/1.1", host: "138.197.145.222:3001"

nginx_1 | 24.215.98.192 - - [30/May/2019:02:23:55 +0000] "GET / HTTP/1.1" 403 556 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" "-"

@tomhschmidt
Copy link
Contributor

@icinsight Did you give it enough time to boot up? You can get a 403 error if you try to access Launch Kit before Docker fully loads.

Can you give details on OS, browser, Launch Kit spec, etc?

@dekz
Copy link
Member

dekz commented May 30, 2019

@tomhschmidt @fabioberger perhaps a default index.html in nginx while the front-end is building since we've designed the containers in this way.

Also seems like we re-build on every docker-compose up, even if the code hasn't changed. Which means this issue persists even after the first (long) build.

Subsequent builds on my laptop take close to a minute. frontend_1 | Done in 46.59s.

@fvictorio
Copy link
Contributor

Yes, a default index.html would be nice. I'll check what is the best way to add it.

Also seems like we re-build on every docker-compose up, even if the code hasn't changed. Which means this issue persists even after the first (long) build.

I don't know if there's a good way of avoiding the re-builds, since that is necessary to let the user configure the environment variables. I mean, that is done in the CMD part of the Dockerfile, so it cannot be cached.

@icinsight
Copy link
Author

Everything is up and running nicely, and I can see the back-end trying to serve the browser in port 3001, but the html file that it is trying to send has a permission issue. I set up and launched everything as root so that may cause the issue. I'll try again.

@fvictorio
Copy link
Contributor

@icinsight that shouldn't be a problem. What is happening is that the app is being built, and that takes some time (about a minute).

Try this: run docker-compose up and wait. Eventually you'll see a long message saying something like:

frontend_1  | Compiled successfully.
frontend_1  | 
frontend_1  | File sizes after gzip:
frontend_1  | 
frontend_1  |   763.5 KB   build/static/js/2.ed73c8a7.chunk.js
frontend_1  |   192.13 KB  build/static/js/main.22e872f2.chunk.js
frontend_1  |   1.28 KB    build/static/css/2.306bd6cf.chunk.css
frontend_1  |   762 B      build/static/js/runtime~main.a8a9905a.js
frontend_1  |   251 B      build/static/css/main.f737b908.chunk.css
...

When that happens, go to localhost:3001 and see if it works.

@icinsight
Copy link
Author

Third time now; works fine. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants