version: "3" services: cyrange: image: cylab/cyrange:0.0.4 container_name: cyrange build: context: . depends_on: - redis - mysql ports: - 8080:80 volumes: - cyrange:/var/www/html/storage - /opt/cyrange/images:/var/www/html/storage/app/images environment: CONTAINER_ROLE: app queue: image: cylab/cyrange:0.0.4 container_name: queue depends_on: - cyrange volumes: - cyrange:/var/www/html/storage - /opt/cyrange/images:/var/www/html/storage/app/images environment: CONTAINER_ROLE: queue scheduler: image: cylab/cyrange:0.0.4 container_name: scheduler depends_on: - cyrange environment: CONTAINER_ROLE: scheduler redis: image: redis:4-alpine container_name: redis volumes: - redis:/data mysql: image: mysql:5.7 container_name: mysql volumes: - mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: cyrange guacd: image: guacamole/guacd:0.9.14 container_name: guacd guacamole: image: guacamole/guacamole:0.9.14 container_name: guacamole depends_on: - guacd - guacamole-mysql environment: GUACD_HOSTNAME: guacd MYSQL_HOSTNAME: guacamole-mysql MYSQL_USER: root MYSQL_PASSWORD: root MYSQL_DATABASE: guacamole ports: - 8081:8080 guacamole-mysql: image: mysql:5.7 container_name: guacamole-mysql # to create the mysql tables when the container is created # https://iamvickyav.medium.com/mysql-init-script-on-docker-compose-e53677102e48 volumes: - "./001-create-schema.sql:/docker-entrypoint-initdb.d/001.sql" - guacamole-mysql:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: guacamole volumes: cyrange: driver: "local" redis: driver: "local" mysql: driver: "local" guacamole-mysql: driver: "local"