Refactor deployment scripts to separate standalone and swarm modes

- Remove ambiguous docker-compose-deploy.yml and debug-deploy.sh
- Update deploy-standalone.sh to use docker-compose-standalone.yaml
- Update deploy-swarm.sh to use docker-compose-swarm.yml
- Standardize error messages to English in deployment scripts
- Add db-backup-swarm.sh for swarm-specific backups
- Unify network naming to util-bills-mongo-network across configs
- Fix MongoDB credentials in swarm compose file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-11-25 19:28:16 +01:00
parent c1686c4cb8
commit 5832e9e691
7 changed files with 74 additions and 147 deletions

View File

@@ -6,19 +6,17 @@ networks:
name: traefik-network
external: true
util-bills-mongo-network:
name: util-bills-mongo-network
internal: true # bridge network, isolated from host and other networks
name: "util-bills-mongo-network"
attachable: false
external: false
internal: true # bridge network, isolated from host and other networks
services:
web-app:
image: utility-bills-tracker:${IMAGE_VERSION}
container_name: evidencija-rezija__web-app
restart: unless-stopped # u slučaju rušenja containera pokušavaj ga pokrenuti dok ne uspije = BESKONAČNO
networks:
- traefik-network
- util-bills-mongo-network
depends_on:
- mongo
volumes:
- ./etc/hosts/:/etc/hosts
environment:
@@ -28,9 +26,13 @@ services:
AUTH_SECRET: Gh0jQ35oq6DR8HkLR3heA8EaEDtxYN/xkP6blvukZ0w=
LINKEDIN_ID: 776qlcsykl1rag
LINKEDIN_SECRET: ugf61aJ2iyErLK40
HOSTNAME: rezije.app # IP address at which the server will be listening (0.0.0.0 = listen on all addresses)
HOSTNAME: rezije.app # IP address at which the server will be listening (0.0.0.0 = listen on all addresses)
NEXTAUTH_URL: https://rezije.app # URL next-auth will use while redirecting user during authentication (if not set - will use HOSTNAME)
PORT: ${PORT:-80}
container_name: evidencija-rezija__web-app
restart: unless-stopped # u slučaju rušenja containera pokušavaj ga pokrenuti dok ne uspije = BESKONAČNO
depends_on:
- mongo
labels:
- traefik.enable=true
- traefik.docker.network=traefik-network # mreže preko koje ide komunikacija sa Traefikom
@@ -49,20 +51,19 @@ services:
- ./mongo-volume:/data/db
networks:
- util-bills-mongo-network
mongo-express:
image: mongo-express
container_name: evidencija-rezija__mongo-express
restart: unless-stopped
networks:
- traefik-network
- util-bills-mongo-network
depends_on:
- mongo
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: HjktJCPWMBtM1ACrDaw7
ME_CONFIG_MONGODB_URL: mongodb://root:HjktJCPWMBtM1ACrDaw7@mongo:27017/
networks:
- traefik-network
- util-bills-mongo-network
container_name: evidencija-rezija__mongo-express
restart: unless-stopped
depends_on:
- mongo
labels:
- traefik.enable=true
- traefik.docker.network=traefik-network # mreže preko koje ide komunikacija sa Traefikom