revert
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
aovantsev
2025-10-08 21:15:50 +03:00
parent 2299803050
commit 4f9182c2db

View File

@@ -10,17 +10,17 @@ steps:
path: /var/run/docker.sock path: /var/run/docker.sock
commands: commands:
# Build the Docker image # Build the Docker image
- docker build -t registry:5000/counter:latest . - docker build -t localhost:5000/counter:latest .
# Push to local registry # Push to local registry
- docker push registry:5000/counter:latest - docker push localhost:5000/counter:latest
# Stop and remove existing container if it exists # Stop and remove existing container if it exists
- docker stop counter-app || true - docker stop counter-app || true
- docker rm counter-app || true - docker rm counter-app || true
# Run the new container with environment variables # Run the new container with environment variables
- docker run -d --name counter-app -e ENVIRONMENT=production -e JWT_SECRET=your-super-secure-production-secret -e DATABASE_URL=postgres://postgres:password@postgres:5432/counter_db?sslmode=disable -e GIN_MODE=release -e LOG_LEVEL=warn -p 8080:8080 --network infra_backend_nw registry:5000/counter:latest - docker run -d --name counter-app -e ENVIRONMENT=production -e JWT_SECRET=your-super-secure-production-secret -e DATABASE_URL=postgres://postgres:password@postgres:5432/counter_db?sslmode=disable -e GIN_MODE=release -e LOG_LEVEL=warn -p 8080:8080 --network infra_backend_nw localhost:5000/counter:latest
volumes: volumes:
- name: dockersock - name: dockersock