From 35aab0e1f1dfad201a876ee717a6beaceefb0143 Mon Sep 17 00:00:00 2001 From: "kube-master@emrekirman.com" Date: Sat, 28 Mar 2026 17:06:43 +0000 Subject: [PATCH] cryto-exhange manifests added --- cryptoexchange/README.md | 1 + cryptoexchange/cryptoexchange.yml | 73 +++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 cryptoexchange/README.md create mode 100644 cryptoexchange/cryptoexchange.yml diff --git a/cryptoexchange/README.md b/cryptoexchange/README.md new file mode 100644 index 0000000..89bf20b --- /dev/null +++ b/cryptoexchange/README.md @@ -0,0 +1 @@ +docker stack deploy -c cryptoexchange.yml --with-registry-auth crypto-exchange diff --git a/cryptoexchange/cryptoexchange.yml b/cryptoexchange/cryptoexchange.yml new file mode 100644 index 0000000..c6efe74 --- /dev/null +++ b/cryptoexchange/cryptoexchange.yml @@ -0,0 +1,73 @@ +version: "3.8" + +services: + cryptoexchange-api: + image: 192.168.1.101:5000/crypto-exchange-api:latest + environment: + - DATABASE_URL=postgresql://postgres:98836@postgres-db:5432/crypto-exchange + - JWT_SECRET=ymKUUjh+fjzz5AQ3xFAcZC3buq00O27E4ES5SJammDfawq2lLrvqUUFagAlECEGhF + - JWT_EXPIRES_IN=7d + networks: + - traefik-public + - crypto_exchange_internal + - postgres_network + deploy: + replicas: 1 + restart_policy: + condition: any + delay: 10s + max_attempts: 6 + window: 180s + update_config: + parallelism: 1 + order: start-first + labels: + - traefik.enable=true + - traefik.http.routers.crypto-api.rule=Host(`crypto.emrekirman.xyz`) && PathPrefix(`/api`) + - traefik.http.routers.crypto-api.entrypoints=websecure + - traefik.http.routers.crypto-api.tls.certresolver=myresolver + - traefik.http.services.crypto-api.loadbalancer.server.port=3000 + - traefik.http.routers.crypto-api.priority=10 + - traefik.http.routers.crypto-api.service=crypto-api + cryptoexchange-ui: + image: 192.168.1.101:5000/crypto-exchange-ui:latest + environment: + - VITE_API_BASE_URL=https://crypto.emrekirman.xyz/api + deploy: + replicas: 1 + update_config: + parallelism: 1 + delay: 10s + order: start-first + restart_policy: + condition: any + delay: 5s + max_attempts: 6 + window: 180s + resources: + limits: + cpus: '1' + memory: 512M + reservations: + cpus: '0.25' + memory: 256M + labels: + - traefik.enable=true + - traefik.http.routers.crypto-ui.rule=Host(`crypto.emrekirman.xyz`) + - traefik.http.routers.crypto-ui.entrypoints=websecure + - traefik.http.routers.crypto-ui.tls.certresolver=myresolver + - traefik.http.services.crypto-ui.loadbalancer.server.port=80 + - traefik.http.routers.crypto-ui.priority=1 + - traefik.http.routers.crypto-ui.service=crypto-ui + networks: + - crypto_exchange_internal + - traefik-public +networks: + postgres_network: + external: true + traefik-public: + external: true + crypto_exchange_internal: + driver: overlay + attachable: true +