# Deployment compose file — pulls the published images from Docker Hub instead # of building from source. Nothing here needs the source tree, so this file can # be copied to a server on its own. # # NOTE: docker-compose.yml in this folder is the same thing under the default # name, and is what the README and build-and-push.sh point at. Keep the two in # sync if you edit one. # # DOCKERHUB_NAMESPACE=fennecsm TAG=latest docker compose -f docker-compose.hub.yml up -d # # Secrets (DB password) come from the environment or a .env sitting next to # this file — they are deliberately not hard-coded here. services: backend: image: ${DOCKERHUB_NAMESPACE:-fennecsm}/fennec-hub-backend:${TAG:-latest} container_name: fennec-backend restart: unless-stopped extra_hosts: - "host.docker.internal:host-gateway" environment: SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-custom} SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL:-jdbc:mysql://host.docker.internal:3306/fennecpro?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC} SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME:-root} SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD:?set SPRING_DATASOURCE_PASSWORD in the environment or .env} # Honor X-Forwarded-* from nginx so Spring reconstructs the original URL. SERVER_FORWARD_HEADERS_STRATEGY: framework FENNEC_HUB_SECURITY_CORS_ALLOWED_ORIGINS: ${FENNEC_HUB_SECURITY_CORS_ALLOWED_ORIGINS:-http://localhost,http://localhost:4200,https://hub.fennecsm.com,https://ecom.fennecsm.com} ports: - "9999:8080" volumes: - /home/fennec/hub:/home/fennec/hub networks: - fennec frontend: image: ${DOCKERHUB_NAMESPACE:-fennecsm}/fennec-hub-admin-ui:${TAG:-latest} container_name: fennec-frontend restart: unless-stopped ports: - "8888:80" depends_on: - backend networks: - fennec frontendcomm: image: ${DOCKERHUB_NAMESPACE:-fennecsm}/fennec-hub-commerce:${TAG:-latest} container_name: fennec-frontendcomm restart: unless-stopped ports: - "8889:80" depends_on: - backend networks: - fennec networks: fennec: driver: bridge