1
1
mirror of https://github.com/twentyhq/twenty.git synced 2024-12-25 21:13:01 +03:00
twenty/.vscode/up.sh
Anders Borch f28edd405f
I can open the project in GitHub ()
* 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>
2023-05-03 11:34:10 +02:00

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