This commit is contained in:
@@ -1,14 +1,9 @@
|
||||
steps:
|
||||
- name: build-and-deploy
|
||||
image: docker:27
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- name: deploy
|
||||
image: curlimages/curl
|
||||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
commands:
|
||||
- docker build -t test-app:latest .
|
||||
- docker stop test-app || true
|
||||
- docker rm test-app || true
|
||||
- docker run -d --name test-app --network traefik-net --label traefik.enable=true --label "traefik.http.routers.test-app.rule=Host(\`test-app.2secure.pl\`)" --label traefik.http.routers.test-app.tls.certresolver=letsencrypt --label traefik.http.services.test-app.loadbalancer.server.port=80 test-app:latest
|
||||
- echo "Deploy OK!"
|
||||
- curl -sf http://172.18.0.9:9000/hooks/deploy-test-app
|
||||
- echo "Deploy triggered!"
|
||||
|
||||
Reference in New Issue
Block a user