-
Notifications
You must be signed in to change notification settings - Fork 49
chore: dockerization of the tuono repo! #276
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
Conversation
Its not this error, I indeed run the ⚡ Tuono v0.16.9 But if I open my browser from my host machine, I get the error : Maybe its about a bad config with the network and docker compose. So, in another terminal from the container, I tried to run a curl: (7) Failed to connect to 127.0.0.1 port 3000 after 0 ms: Couldn't connect to server Currently I stoped my investigations with theses two commands from the container :
the processus |
Thanks for this! This is a great addition. |
I tested the configuration locally and everything works! ⚡ I noticed that I had to do again |
Yeah !
Hmmm its not normal because this command is ran during the container building (the line |
@spacecodeur Could you please check out the needed great improvement btw! |
Also, could you please also update the documentation adding a section about docker in Local development? Warning We just updated the documentation site. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@spacecodeur since you checked "Maintainers are allowed to edit this pull request" I'm going to try to fix the branch. FYI next time happen something like this use TL; DR; Git reflog keeps track of every action you perform in the repository |
0. Dockerfile: Removed NVM from the Docker image build process, now directly downloading the standalone Node.js based on the version specified in .nvmrc 1. Dockerfile & compose.yml: Various improvements on comments and removal of obsolete code
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.
Unfortunately the "manual pnpm install
" is still required to make the image work.
I also noticed an additional improvement that can be made to install the proper version of pnpm
.
I have created two threads to discuss each point easily.
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
apps/documentation/src/routes/documentation/contributing/local-development.mdx
Outdated
Show resolved
Hide resolved
@spacecodeur documentation code formatting CI is failing. You should run |
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.
LGTM!
I prefer to wait that @Valerioageno test the image on a Windows machine before merging (just to be sure).
Ill take a look soon |
I had already fixed the format issue yesterday. |
Already tested on Windows! But two tests are always better than one. |
@spacecodeur is possibile to test the image building via GitHub actions? |
@marcalexiei |
Hey guys! I'm travelling right now. I expect to test it the first days of the next week! |
67d3098
to
a918e44
Compare
Probably it is just a problem with my dirty containers setup. I use WLS and I tried to install Docker directly on windows. Maybe something went wrong with WLS. If windows works for you we can merge. Just fix the CI pipelines! |
Context & Description
I have dockerized the repo to simplify local development on the source code (one environment to rule them all!). To determine which packages to install and their order, I relied on the 'local development' documentation.
Everything has been isolated in a dedicated docker folder (to avoid adding extra configuration files at the root of the project).
Currently, packages such as
pnpm
,turbo
, andcargo
are properly installed, and tuono (seems) compiles correctly. I noticed that the Node version is currently managed via the/.nvmrc
file. To streamline the build process (and centralize versioning) with Docker, I have transferred this version into thedocker/compose.yml
file.How to use Docker (with this current work)
Firstly, install docker and docker compose.
Then navigate to the root of the project using your terminal, then...
docker compose -f docker/compose.yml up --build -d
docker images && docker ps -a --size
docker exec -it tuono-source-container /bin/bash
The docker container's responsability is to handle all the project environment. That's mean you have only to just install your prefered IDE (like vscode by example), connect it to the docker container and the dev can begin ! The code source is sync between container and host ; at the end, you can git add/commit/push/... from your host machine.
To do
tuono dev
command seems work well, but acurl http://127.0.0.1:3000
from container failed). I haven't found how to fix this problem yet..turbo check-all
does not work (turbo error : could not find task check-all in project). I have to run directlyturbo build lint format:check types --filter='!./examples'
Once the work with Docker is complete, I can suggest updating the documentation to summarize how to use it, if you'd like :)