diff --git a/.drone.yml b/.drone.yml index 3162977..ff9e0fa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,7 +4,7 @@ name: default clone: depth: 1 - submodules: true # Ensure git submodules are cloned + submodules: true # Ensure submodules like pxy_city_digital_twins are cloned steps: - name: install dependencies and check Django project @@ -14,9 +14,39 @@ steps: from_secret: DATABASE_URL SECRET_KEY: from_secret: SECRET_KEY - DEBUG: "False" + DEBUG: + from_secret: DEBUG + NEO4J_URI: + from_secret: NEO4J_URI + NEO4J_USERNAME: + from_secret: NEO4J_USERNAME + NEO4J_PASSWORD: + from_secret: NEO4J_PASSWORD + OPENAI_API_KEY: + from_secret: OPENAI_API_KEY + PAGE_ACCESS_TOKEN: + from_secret: PAGE_ACCESS_TOKEN + VERIFY_TOKEN: + from_secret: VERIFY_TOKEN commands: - python -m pip install --upgrade pip - pip install -r requirements.txt - - python manage.py check || true # Avoid crashing if env not ready + - python manage.py check - echo "✅ Django check completed" + + - name: deploy to production + image: appleboy/ssh + settings: + host: + from_secret: PROD_HOST + username: + from_secret: PROD_USER + port: 22 + key: + from_secret: PROD_SSH_KEY + script: + - cd /home/polisplexity/app.polisplexity.tech + - git pull origin main + - docker compose down + - docker compose up -d --build + - echo "🚀 Deployment complete" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..125e2a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Python +__pycache__/ +*.py[cod] +*.sqlite3 + +# Environment +.env +*.env +*.env.* + +# Django +db.sqlite3 +*.log + +# VSCode +.vscode/ +*.code-workspace + +# Media/static/runtime +/media +/static +/cache +*.dump.sql +*.load +*.sql + +# System +.DS_Store diff --git a/pxy_city_digital_twins b/pxy_city_digital_twins index e4ca275..ec7de54 160000 --- a/pxy_city_digital_twins +++ b/pxy_city_digital_twins @@ -1 +1 @@ -Subproject commit e4ca27541e264e4916481d96f0e0fb0d68b0672b +Subproject commit ec7de54fe9464aef7cad6895d7f87df4e3239cda