From 57b899f31590ab08b65a0acfa696d10b3d143849 Mon Sep 17 00:00:00 2001 From: Anja Freudenreich Date: Thu, 13 Feb 2025 14:03:38 +0000 Subject: [PATCH] .drone.yml aktualisiert --- .drone.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index c587dd3..a6340b3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,18 +7,17 @@ steps: image: python:3.9-slim commands: - pip install --no-cache-dir -r requirements.txt - - python app.py & # Run the Flask app in the background to simulate deployment + - python app.py & # Run Flask app in background - - name: build docker image and deploy - image: docker:20.10 # Docker image to build and run the container - services: - - name: docker - image: docker:20.10 - privileged: true # Allow Docker-in-Docker for building the image + - name: deploy + image: python:3.9-slim + when: + status: success commands: - - docker build -t my-flask-app:${DRONE_BUILD_NUMBER} . # Build Docker image - - docker run -d -p 5000:5000 my-flask-app:${DRONE_BUILD_NUMBER} # Run Flask app in container + - echo "Deploying app to production..." + - python deploy.py # Run your deployment script or use SSH + secrets: [ eins ] # Use secrets to securely store deployment credentials trigger: branch: - - master \ No newline at end of file + - master