Skip to content

Commit 2e5a6bd

Browse files
Merge pull request #215 from Houssien-Zeineddine/docker-and-pipeline
fixing the jwt bug in pipeline
2 parents 4233457 + 5772f82 commit 2e5a6bd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.github/workflows/deploy.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,23 @@ jobs:
198198
exit 1
199199
fi
200200
201+
# Fix PsySH directory
202+
docker exec $BACKEND_CONTAINER mkdir -p /app/storage/psysh
203+
docker exec $BACKEND_CONTAINER chmod -R 775 /app/storage/psysh
204+
docker exec $BACKEND_CONTAINER /bin/sh -c "echo 'PSYSH_CONFIG_DIR=/app/storage/psysh' >> /app/.env"
205+
206+
# Generate JWT secret
207+
docker exec $BACKEND_CONTAINER php artisan jwt:secret --force
208+
209+
# Set permissions
210+
docker exec $BACKEND_CONTAINER chown -R www-data:www-data /app/storage
211+
docker exec $BACKEND_CONTAINER chmod -R 775 /app/storage
212+
docker exec $BACKEND_CONTAINER chmod -R 775 /app/bootstrap/cache
213+
214+
# Clear caches
215+
docker exec $BACKEND_CONTAINER php artisan optimize:clear
216+
docker exec $BACKEND_CONTAINER php artisan config:cache
217+
201218
docker exec $BACKEND_CONTAINER php artisan migrate --force
202219
203220
# Check if seeding is needed (if ALL tables are empty)

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- DB_USERNAME=root
99
- DB_PASSWORD=1234
1010
- APP_ENV=production
11-
- APP_DEBUG=false
11+
- APP_DEBUG=tru
1212
restart: always
1313
depends_on:
1414
- db

0 commit comments

Comments
 (0)