We will remove the `twenty-postgres` image that was used for local
development and only use `twenty-postgres-pilo` (which we use in prod),
bringing the development environment closer to prod and avoiding having
to maintain 2 images.
Instead of provisioning the super user after the db initialization, we
directly rely on the superuser provided by Spilo for simplicity. We also
introduce a change that tries to create the right database (`default` or
`test`) based on the context.
How to test:
```
docker build -t twentycrm/twenty-postgres-spilo:latest -f ./packages/twenty-docker/twenty-postgres-spilo/Dockerfile .
docker images --no-trunc | grep twenty-postgres-spilo
postgres-on-docker:
docker run \
--name twenty_pg \
-e PGUSER_SUPERUSER=twenty \
-e PGPASSWORD_SUPERUSER=twenty \
-e ALLOW_NOSSL=true \
-v twenty_db_data:/home/postgres/pgdata \
-p 5432:5432 \
REPLACE_WITH_IMAGE_ID
```
This PR updates the install.sh script to fetch the docker-compose.yml
file from the GitHub branch or tag that matches the version specified by
the user, instead of defaulting to the main branch.
---------
Co-authored-by: Félix Malfait <felix@twenty.com>
Having 2 different dev setups caused confusion, let's remove the Docker
local setup and recommend people install yarn locally.
Also simplified some docs by merging pages together, the recommend
self-hosting option is now the docker-compose / to adapt the
docker-compose.
* feat: add more dependencies check, randomize postgres admin password, tail logs of server container
* feat: improve retro compatibility
* feat: comment POSTGRES_ADMIN_PASSWORD as it will be generated by the one liner
* feat: add one liner
* fix: interactive issue & add support for both linux & mac
* feat: move quick start documentation
* feat: catch errors
* feat: check if directory exists
* feat: default to yes for prompt
* feat: open in browser
* fix: format
* feat: do not expose STORAGE_LOCAL_PATH env but handle the case where it would be set
* fix: db reset command wasn't working out of the box
* Update install.sh
Co-authored-by: Darek Desu <4459421+darekdesu@users.noreply.github.com>
* feat: harden the whole UX with one-liner
* fix: small logical order adjustment
* Update packages/twenty-docs/docs/start/self-hosting/docker-compose.mdx
---------
Co-authored-by: Darek Desu <4459421+darekdesu@users.noreply.github.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>