mirror of
https://github.com/lingble/twenty.git
synced 2025-11-03 06:07:56 +00:00
Fixs/reviews setups (#3067)
* update syntax to POSIX The function keyword is not recognize by every POSIX-compliant shell. The function keyword is a bashism, a bash extension. POSIX syntax does not use function and mandates the use of parenthesis. This commit fixes the two issues : ./linux/provision-postgres-linux.sh: 9: function: not found ./linux/provision-postgres-linux.sh: 15: Syntax error: "}" unexpected * update path init.sql * update steps numbers yarn setup There were two number 3's, everything should be correct now. * delete useless -e
This commit is contained in:
@@ -154,7 +154,7 @@ You can access this using `twenty` postgres user (password: `twenty`)
|
|||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|
||||||
## Step 3: Setup environment variables
|
## Step 4: Setup environment variables
|
||||||
|
|
||||||
Twenty requires you to set some environment variables. Locally, you should set them through a `.env` file.
|
Twenty requires you to set some environment variables. Locally, you should set them through a `.env` file.
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ cp ./packages/twenty-front/.env.example ./packages/twenty-front/.env
|
|||||||
cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env
|
cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 4: Installing dependencies
|
## Step 5: Installing dependencies
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ nvm use #recommended
|
|||||||
yarn
|
yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 5: Running the project
|
## Step 6: Running the project
|
||||||
|
|
||||||
Setup your database with the following command:
|
Setup your database with the following command:
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
RED=31
|
RED=31
|
||||||
@@ -6,16 +6,16 @@ GREEN=32
|
|||||||
BLUE=34
|
BLUE=34
|
||||||
|
|
||||||
# Function to display colored output
|
# Function to display colored output
|
||||||
function echo_header {
|
echo_header () {
|
||||||
COLOR=$1
|
COLOR=$1
|
||||||
MESSAGE=$2
|
MESSAGE=$2
|
||||||
echo -e "\e[${COLOR}m\n=======================================================\e[0m"
|
echo "\e[${COLOR}m\n=======================================================\e[0m"
|
||||||
echo -e "\e[${COLOR}m${MESSAGE}\e[0m"
|
echo "\e[${COLOR}m${MESSAGE}\e[0m"
|
||||||
echo -e "\e[${COLOR}m=======================================================\e[0m"
|
echo "\e[${COLOR}m=======================================================\e[0m"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to handle errors
|
# Function to handle errors
|
||||||
function handle_error {
|
handle_error () {
|
||||||
echo_header $RED "Error: $1"
|
echo_header $RED "Error: $1"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -75,5 +75,5 @@ fi
|
|||||||
|
|
||||||
# Run the init.sql to setup database
|
# Run the init.sql to setup database
|
||||||
echo_header $GREEN "Step [4/4]: Setting up database..."
|
echo_header $GREEN "Step [4/4]: Setting up database..."
|
||||||
cp ./postgres/init.sql /tmp/init.sql
|
cp ./init.sql /tmp/init.sql
|
||||||
sudo -u postgres psql -f /tmp/init.sql || handle_error "Failed to execute init.sql script."
|
sudo -u postgres psql -f /tmp/init.sql || handle_error "Failed to execute init.sql script."
|
||||||
|
|||||||
Reference in New Issue
Block a user