Compare commits
13 Commits
b88f7deb43
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
b025ed2256
|
|||
|
2fbe1a1e4d
|
|||
|
8f6a0bb85a
|
|||
|
f3b01adc5f
|
|||
|
35aa06b33b
|
|||
|
a5bb2cb35c
|
|||
|
409c32a207
|
|||
|
6878f1a291
|
|||
|
9f364bf677
|
|||
|
6600a22475
|
|||
|
23e20a0015
|
|||
|
10f3062779
|
|||
|
f978cad3f6
|
@@ -62,13 +62,23 @@ jobs:
|
||||
set -e
|
||||
cd ${{ secrets.DEPLOY_PATH }}
|
||||
|
||||
echo "==> Pull branche dev"
|
||||
git pull origin dev
|
||||
echo "==> Correction des permissions"
|
||||
sudo chown -R "$(whoami):" .
|
||||
|
||||
echo "==> Redémarrage Directus"
|
||||
docker compose restart directus
|
||||
echo "==> Synchronisation branche dev"
|
||||
git fetch origin dev
|
||||
git reset --hard origin/dev
|
||||
|
||||
echo "==> Vérification santé"
|
||||
sleep 5
|
||||
curl -sf http://localhost:8066/server/health | grep -q '"status":"ok"'
|
||||
echo "==> Réseau Docker"
|
||||
docker network inspect konstitisyon_network >/dev/null 2>&1 \
|
||||
|| docker network create konstitisyon_network
|
||||
|
||||
echo "==> Initialisation base de données"
|
||||
[ -f database/data.db ] || cp database/data.sample.db database/data.db
|
||||
|
||||
echo "==> Permissions volumes"
|
||||
sudo chown -R 1000:1000 database uploads
|
||||
|
||||
echo "==> Démarrage Directus"
|
||||
docker compose up -d --wait
|
||||
echo "Déploiement OK"
|
||||
|
||||
+7
-1
@@ -2,12 +2,18 @@ services:
|
||||
directus:
|
||||
image: directus/directus:11.17.2
|
||||
ports:
|
||||
- 8066:8066
|
||||
- 8066:8055
|
||||
volumes:
|
||||
- ./database:/directus/database
|
||||
- ./uploads:/directus/uploads
|
||||
- ./extensions:/directus/extensions
|
||||
env_file: ".env"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "node -e \"require('http').get('http://localhost:8055/server/health',r=>process.exit(r.statusCode<400?0:1)).on('error',()=>process.exit(1))\""]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 30s
|
||||
networks:
|
||||
- konstitisyon_network
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user