Skip to content

Commit

Permalink
URBIBBNA-44
Browse files Browse the repository at this point in the history
Mit Deploy auf Swarm (neue Methode)
  • Loading branch information
epam-vkerkhoff committed Jan 26, 2024
1 parent 876b2ca commit 56c3828
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 48 deletions.
42 changes: 13 additions & 29 deletions .github/workflows/publish-flotte-gbfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,16 @@ jobs:
ghcr.io/bbnavi/publish-flotte-gbfs \
/bin/sh publish.sh bbnavi/flotte
# https://twitter.com/derhuerst/status/1511660213111336961
# - name: inline env vars to work around quantum-cli support
# env:
# MINIO_ACCESS_KEY: "${{ secrets.MINIO_ACCESS_KEY }}"
# MINIO_SECRET_KEY: "${{ secrets.MINIO_SECRET_KEY }}"
# run: |
# cd publish-flotte-gbfs
# sudo apt install -y moreutils
# docker-compose -f quantum-stack.yml config | sponge quantum-stack.yml

# - name: publish publish-flotte-gbfs Docker image
# uses: docker/build-push-action@v4
# with:
# context: publish-flotte-gbfs
# push: true
# tags: registry.gitlab.tpwd.de/tpwd/bb-navi/publish-flotte-gbfs
# - name: deploy to bbnavi infrastructure
# env:
# QUANTUM_USER: "${{ secrets.QUANTUM_USER }}"
# QUANTUM_PASSWORD: "${{ secrets.QUANTUM_PASSWORD }}"
# QUANTUM_ENDPOINT: "tpwd-bb-navi"
# QUANTUM_STACK: "publish-flotte-gbfs-tpwd-bb-navi"
# run: |
# cd publish-flotte-gbfs
# docker run --rm -i \
# -v $PWD:/app -w /app \
# -e QUANTUM_USER -e QUANTUM_PASSWORD -e QUANTUM_ENDPOINT -e QUANTUM_STACK \
# r.planetary-quantum.com/quantum-public/cli:2 \
# quantum-cli stacks update --create --wait
deploy:
runs-on: [self-hosted, deploy]
needs:
- build-test-deploy
env:
MOQO_ACCESS_TOKEN: "${{ secrets.MOQO_ACCESS_TOKEN }}"
MINIO_ACCESS_KEY: "${{ secrets.OPENDATA_KEY }}"
MINIO_SECRET_KEY: "${{ secrets.OPENDATA_SECRET }}"
steps:
- uses: actions/checkout@v2
- name: Deploy Stack
run: |
docker stack deploy --compose-file ./docker-compose.yml commonsbooking2gbfs
19 changes: 19 additions & 0 deletions publish-flotte-gbfs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3.7'

services:
publish-flotte-gbfs:
image: ghcr.io/bbnavi/publish-flotte-gbfs
environment:
MINIO_ACCESS_KEY: "${{ secrets.OPENDATA_KEY }}"
MINIO_SECRET_KEY: "${{ secrets.OPENDATA_SECRET }}"
deploy:
replicas: 1
placement:
constraints:
- node.role == worker
networks:
- public

networks:
public:
external: true
19 changes: 0 additions & 19 deletions publish-flotte-gbfs/quantum-stack.yml

This file was deleted.

0 comments on commit 56c3828

Please sign in to comment.