version: '3.1'

services:
  cmc-new-backend:
    build:
      context: ./support-portal-backend
      dockerfile: Dockerfile
    restart: always
    ports:
      - "8070:8080"
    environment:
      - DATABASE_HOST=mysql-common-mysql-1
      - SPRING_DATASOURCE_URL=jdbc:mysql://mysql-common-mysql-1:3306/demo
      - SPRING_DATASOURCE_USERNAME=youruser
      - SPRING_DATASOURCE_PASSWORD=youruserpassword
    networks:
      - cmc-forntend
      - mysql-common_mynetwork

volumes:
  db-data: {}

networks:
  cmc-forntend: {}
  mysql-common_mynetwork:
    external: true