Ajout de nocodb au script
This commit is contained in:
17
README.md
17
README.md
@@ -4,7 +4,7 @@ Installation de :
|
||||
- tree
|
||||
- docker
|
||||
```
|
||||
curl -o install.sh https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install.sh
|
||||
curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install.sh
|
||||
chmod +x install.sh
|
||||
./install.sh
|
||||
```
|
||||
@@ -26,7 +26,7 @@ mkdir -p /home/$USER/docker
|
||||
sudo chown $USER:$USER /var/run/docker.sock
|
||||
sudo chown -R $USER:$USER /home/$USER/docker
|
||||
sudo chmod -R 775 /home/$USER/docker
|
||||
curl -o install-docker.sh https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-docker.sh
|
||||
curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-docker.sh
|
||||
chmod +x install-docker.sh
|
||||
./install-docker.sh
|
||||
```
|
||||
@@ -36,7 +36,7 @@ Si vous voulez procéder à l'installation de site web vuejs
|
||||
source ~/.bashrc
|
||||
nvm install 20.18.0
|
||||
nvm use 20.18.0
|
||||
curl -o install-vuejs.sh https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-vuejs.sh
|
||||
curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-vuejs.sh
|
||||
chmod +x install-vuejs.sh
|
||||
./install-vuejs.sh
|
||||
```
|
||||
@@ -45,9 +45,18 @@ Si vous voulez procéder à l'installation de strapi
|
||||
Installation docker de :
|
||||
- strapi:3004
|
||||
```
|
||||
curl -o install-strapi.sh https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-strapi.sh
|
||||
curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-strapi.sh
|
||||
chmod +x install-strapi.sh
|
||||
./install-strapi.sh
|
||||
```
|
||||
|
||||
Si vous voulez procéder à l'installation de nocodb
|
||||
Installation docker de :
|
||||
- nocodb:3005
|
||||
```
|
||||
curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/install-nocodb.sh
|
||||
chmod +x install-nocodb.sh
|
||||
./install-nocodb.sh
|
||||
```
|
||||
|
||||
L'adresse IP des docker est `172.17.0.1`.
|
||||
|
||||
17
install-nocodb.sh
Normal file
17
install-nocodb.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
# Vérifier si le dossier nocodb est déjà créé dans le répertoire de docker
|
||||
if command -v docker &> /dev/null; then
|
||||
if ! [ -d "/home/$USER/docker/nocodb" ]; then
|
||||
read -p "Voulez-vous installer nocodb dans le répertoire docker ? (o/n) " response
|
||||
if [[ $response =~ ^[Oo]$ ]]; then
|
||||
mkdir -p /home/$USER/docker/nocodb
|
||||
cd /home/$USER/docker/nocodb
|
||||
curl -O https://ganesh.turing.untypequicode.fr/untypequicode/script-vps/raw/branch/main/nocodb/docker-compose.yml
|
||||
docker compose up -d
|
||||
cd /home/$USER
|
||||
else
|
||||
echo "Le dossier nocodb n'a pas été créé"
|
||||
fi
|
||||
else
|
||||
echo "Le dossier nocodb existe déjà"
|
||||
fi
|
||||
else
|
||||
31
nocodb/docker-compose.yml
Normal file
31
nocodb/docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
version: "2.1"
|
||||
services:
|
||||
nocodb:
|
||||
depends_on:
|
||||
root_db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NC_DB: "pg://root_db:5432?u=postgres&p=password&d=root_db"
|
||||
image: "nocodb/nocodb:latest"
|
||||
ports:
|
||||
- "3005:8080"
|
||||
restart: always
|
||||
volumes:
|
||||
- "nc_data:/usr/app/data"
|
||||
root_db:
|
||||
environment:
|
||||
POSTGRES_DB: root_db
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_USER: postgres
|
||||
healthcheck:
|
||||
interval: 10s
|
||||
retries: 10
|
||||
test: 'pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"'
|
||||
timeout: 2s
|
||||
image: postgres
|
||||
restart: always
|
||||
volumes:
|
||||
- "db_data:/var/lib/postgresql/data"
|
||||
volumes:
|
||||
db_data: {}
|
||||
nc_data: {}
|
||||
Reference in New Issue
Block a user