github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/docker-compose.yml (about) 1 version: '3' 2 3 services: 4 5 mysql: 6 image: mysql:latest 7 environment: 8 MYSQL_ROOT_PASSWORD: iacf12345678 9 volumes: 10 - mysql-data:/var/lib/mysql 11 - ../dump/iac.sql:/docker-entrypoint-initdb.d/dump.sql 12 - ../dump/create-user.sql:/docker-entrypoint-initdb.d/create-user.sql 13 # command: 14 # - init-file=/docker-entrypoint-initdb.d/create-user.sql 15 # - mysql -u root -p"$${MYSQL_ROOT_PASSWORD}" iac < /docker-entrypoint-initdb.d/dump.sql 16 ports: 17 - "3306:3306" 18 networks: 19 - backend 20 21 mongodb: 22 image: mongo:latest 23 volumes: 24 - mongodb-data:/data/db 25 - ../dump/IAC_CFG:/docker-entrypoint-initdb.d/dump 26 #command: mongod --bind_ip_all --replSet rs0 27 # echo "Restoring MongoDB dump..." 28 # mongorestore /db:IAC_CFG /uri:mongodb://localhost:27017 /docker-entrypoint-initdb.d/dump 29 ports: 30 - "27017:27017" 31 networks: 32 - backend 33 34 app-server: 35 image: iac 36 depends_on: 37 - mysql 38 - mongodb 39 ports: 40 - "8080:8080" 41 networks: 42 - backend 43 44 web-server: 45 image: iac-ui 46 depends_on: 47 - app-server 48 ports: 49 - "8000:8000" 50 networks: 51 - backend 52 - frontend 53 54 signalr-server: 55 image: iac-signalrsrv 56 ports: 57 - "8222:8222" 58 networks: 59 - backend 60 - frontend 61 62 mqtt-client: 63 image: iac-mqtt 64 depends_on: 65 - mysql 66 - mongodb 67 - app-server 68 networks: 69 - backend 70 71 volumes: 72 mysql-data: 73 mongodb-data: 74 75 networks: 76 backend: 77 frontend: 78 driver: bridge