-
Notifications
You must be signed in to change notification settings - Fork 14
Add Dockerfiles and docker-compose.yml #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
c956bb3
to
e55572a
Compare
Alright, I solved a few problems with inspiration from @CCimen:
I think it's getting ready to merge but there's probably things I missed. |
I think this looks good! Two separate urls would be optimal as you say, but since we at the moment don't have that (and I am not sure how much of the frontend code we would need to change) I think that this is fine for now. However I think we should add a section at the top of the README for the new (and improved!) way to spin up intric 🙌 |
I added a section at the bottom of the README. Feel free to move it. I don't think this docker-compose file is good enough for more than testing for now so I think it's good to gather a bit more feedback and improvements before making it the preferred way of installing. Have you tried it @Jontpan? There are a few problems I'm having with importing non-text documents in Knowledge, or accessing the admin pages Users and getting disconnected. I don't think they're linked to running in containers, though. |
I'm curious, can you elaborate a bit on this? What makes you think/say that the frontend connects to the backend both from the web browser to e.g. FWIW, I run Intric with Caddy as a reverse proxy in front of both the frontend and backend services, so that there is just one endpoint for clients to connect to (that is, the user visits the endpoint to get the frontend, and the frontend running in their browser then connects to e.g. /api/v1 through the same endpoint). Perhaps you should add a reverse proxy to the Docker Compose setup here, so that you can have this working nicely as well (and also get Let's Encrypt support at the same time)? On a related note (if I'm not mistaken here), how did you deal with |
@@ -0,0 +1,19 @@ | |||
FROM python:3.10-slim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get an error that gcc
is not available. It works fine when switching to python:3.10
, which should be ok if this is intended for development use. Otherwise installing gcc
via apt-get below also works.
If run locally (outside docker) it will expose the developer's machine in the local network, which might be an unwanted side-effect. The same could be achieved by using the "scripts": {
"dev:docker": "NODE_ENV=development FORCE_COLOR=1 pnpm -w run /^dev:docker:.*/",
"dev:docker:web": "pnpm run --filter @intric/web dev --host 0.0.0.0",
"dev:docker:ui": "pnpm run --filter @intric/ui dev",
[...]
} This would make more explicit what actually is happening? On an other note: it might also be quite useful to mount the frontend directories as volumes, so changes in the underlying sources will actually affect the running app. |
Co-authored-by: Simon Pantzare <[email protected]>
Not fully ready to merge but a good first start that others can contribute to. cc @thomaswennersten 👻
There is a small issue with the frontend. Running the backend and its two dependencies works great.
After everything is built and started, the database can be initialised using:
I haven't forwarded the ports of the database containers so in the backend
.env
file, you will need to point the backend towards their Docker addresses:You can also point the frontend at the backend if you don't wish to forward its port 8123: