Setting up Twenty locally

Everytime I run make ... command, I get the following error
$ make provision-postgres
make -C infra/dev provision-postgres
make[1]: Entering directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
make[1]: *** [Makefile:9: provision-postgres] Error 1
make[1]: Leaving directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
make: *** [Makefile:2: provision-postgres] Error 2
$ make provision-postgres
make -C infra/dev provision-postgres
make[1]: Entering directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/
make[1]: *** [Makefile:9: provision-postgres] Error 1
make[1]: Leaving directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
make: *** [Makefile:2: provision-postgres] Error 2
How do I fix this?
26 Replies
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
I'm using Ubuntu 20.04.6 if that helps
Twenty Bot
Twenty Bot2y ago
GG @ɃØĦɆᵾS, you just advanced to level 1!
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
If I change the version from 3.9 to 3.6, it works, but I get another error
make[1]: Entering directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
Creating network "dev_default" with the default driver
Creating volume "dev_db_data" with default driver
Creating volume "dev_twenty_node_modules_front" with default driver
Creating volume "dev_twenty_node_modules_server" with default driver
Creating volume "dev_twenty_node_modules_docs" with default driver
ERROR: No such service: -d
make[1]: *** [Makefile:9: provision-postgres] Error 1
make[1]: Leaving directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
make: *** [Makefile:2: provision-postgres] Error 2
make[1]: Entering directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
Creating network "dev_default" with the default driver
Creating volume "dev_db_data" with default driver
Creating volume "dev_twenty_node_modules_front" with default driver
Creating volume "dev_twenty_node_modules_server" with default driver
Creating volume "dev_twenty_node_modules_docs" with default driver
ERROR: No such service: -d
make[1]: *** [Makefile:9: provision-postgres] Error 1
make[1]: Leaving directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
make: *** [Makefile:2: provision-postgres] Error 2
When I deleted -d from Makefile, it went further, but I got another error
Step 8/9 : RUN dpkg --install pg_graphql.deb
---> Running in c6025861fdce
dpkg: error processing archive pg_graphql.deb (--install):
package architecture (arm64) does not match system (amd64)
Errors were encountered while processing:
pg_graphql.deb
ERROR: Service 'postgres' failed to build: The command '/bin/sh -c dpkg --install pg_graphql.deb' returned a non-zero code: 1
make[1]: *** [Makefile:9: provision-postgres] Error 1
Step 8/9 : RUN dpkg --install pg_graphql.deb
---> Running in c6025861fdce
dpkg: error processing archive pg_graphql.deb (--install):
package architecture (arm64) does not match system (amd64)
Errors were encountered while processing:
pg_graphql.deb
ERROR: Service 'postgres' failed to build: The command '/bin/sh -c dpkg --install pg_graphql.deb' returned a non-zero code: 1
make[1]: *** [Makefile:9: provision-postgres] Error 1
Lucas
Lucas2y ago
Hi @ɃØĦɆᵾS Do you have a m1 or m2 chip ?
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
No, AMD Ryzen I don't have any Mac devixe
Lucas
Lucas2y ago
It seems that there is a problem with your docker engine Could you update it ?
Lucas
Lucas2y ago
Docker Documentation
Install Docker Engine
Choose the best method for you to install Docker Engine. This client-server application is available on Linux, Mac, Windows, and as a static binary.
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
Rather the problem lies in fact that docker-compose becomes slowly obsolete
Lucas
Lucas2y ago
It's strange that it tries to build for arm64, I checked and saw nothing associated with it in the dockerfiles ...
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
How can I change this then to download proper package for arm64 architecture?
Lucas
Lucas2y ago
Your architecture should be amd64 so check that your docker engine matches this architecture
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
It is x86_64 That's weird
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Twenty Bot
Twenty Bot2y ago
GG @Jérémy, you just advanced to level 1!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Twenty Bot
Twenty Bot2y ago
GG @ADIIS007, you just advanced to level 1!
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lucas
Lucas2y ago
Hi @ɃØĦɆᵾS any update on your issue ?
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
Not really, once I get back to home, I'll check it
Lucas
Lucas2y ago
@ɃØĦɆᵾS A contributor just pushed a PR which should fix your problem ! Could you try pulling main and redoing everything from start again ?
Lucas
Lucas2y ago
GitHub
fix docker dev by tomalexing · Pull Request #1844 · twentyhq/twenty
Lets fix the docker's dev infa for all the possible TARGETARCH. Before: [+] Building 0.2s (8/9) ...
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
@Lucas yes, I can Tbh, it now failed on 9th step
Step 9/10 : RUN dpkg --install pg_graphql.deb
---> Running in 4791de92b487
dpkg-deb: error: unexpected end of file in archive magic version number in pg_graphql.deb
dpkg: error processing archive pg_graphql.deb (--install):
dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
pg_graphql.deb
ERROR: Service 'postgres' failed to build: The command '/bin/sh -c dpkg --install pg_graphql.deb' returned a non-zero code: 1
make[1]: *** [Makefile:9: provision-postgres] Error 1
make[1]: Leaving directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
Step 9/10 : RUN dpkg --install pg_graphql.deb
---> Running in 4791de92b487
dpkg-deb: error: unexpected end of file in archive magic version number in pg_graphql.deb
dpkg: error processing archive pg_graphql.deb (--install):
dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
pg_graphql.deb
ERROR: Service 'postgres' failed to build: The command '/bin/sh -c dpkg --install pg_graphql.deb' returned a non-zero code: 1
make[1]: *** [Makefile:9: provision-postgres] Error 1
make[1]: Leaving directory '/home/BOHEUS/Desktop/Twenty/twenty/infra/dev'
Also, I had to make 2 changes I wrote about earlier: changing version from 3.9 to 3.7 (that's the highest version supported for me) and deleting -d from Makefile @Lucas the fix is really easy, replace all docker-compose with docker compose, I can commit it once I get back, create a new issue or comment it in #1844?
Lucas
Lucas2y ago
If it's something that should be added in the documentation it's better to open a PR even for a tiny change like that. Right now it's really helpful because this step of the setup is still a bit buggy for some people, so your experience is precious !
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
Ok, I'll create a PR once I get back to home
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
GitHub
Update troubleshooting.mdx by BOHEUS · Pull Request #1895 · twentyh...
Updated troubleshooting.mdx with possible solution to Docker related problems
ɃØĦɆᵾS
ɃØĦɆᵾSOP2y ago
I'll create more PRs once I set up properly the machine to write backend tests Could someone mark this post as "Solved"? It looks like I'm unable to do it

Did you find this page helpful?