mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-18 17:12:53 +03:00
f28edd405f
* Ignore node_modules * Use bash-compatible dotenv format While still being compatible with dotenv, this also allows sourcing the file to export all variables in bash. * Add prettier extension to recommendations * Move to port 5001 to avoid conflict with macOS services * Add workspace * Add devcontainer This automatically starts with all environment variables available locally. It brings up services which are dependent on each other individually and verifies health before moving on to the next service. * Split init into clean, up, and logs tasks. This allows the developer to set up .env and .npmrc files before running services, and does not require starting from a clean db every time the devcontainer is restarted. * Copy .env when creating codespace * Automatically run UP command upon devcontainer creation * Fix log message --------- Co-authored-by: Felix Malfait <felix.malfait@gmail.com>
35 lines
694 B
Bash
Executable File
35 lines
694 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "$0")/../infra/dev"
|
|
|
|
cp .env.example .env
|
|
|
|
set -o allexport; source .env; set +o allexport
|
|
|
|
docker-compose up -d postgres
|
|
|
|
while ! pg_isready -h localhost > /dev/null ; do
|
|
echo "Waiting for Postgres to be ready..."
|
|
sleep 1
|
|
done
|
|
|
|
echo "Postgres is accepting connections!"
|
|
|
|
docker-compose up -d twenty-hasura
|
|
|
|
while ! curl -s http://localhost:8080/healthz > /dev/null ; do
|
|
sleep 1
|
|
echo "Waiting for Hasura to be ready..."
|
|
done
|
|
|
|
docker-compose up -d hasura-auth
|
|
|
|
while ! curl -s http://localhost:4000/healthz > /dev/null ; do
|
|
sleep 1
|
|
echo "Waiting for Hasura Auth to be ready..."
|
|
done
|
|
|
|
docker-compose exec twenty-hasura hasura deploy
|
|
|
|
docker-compose up -d
|