# mail@dongguochao.com version: '2.2' services: delos: container_name: rap2-delos # build from ./Dockerfile build: . # build from images #image: blackdog1987/rap2-delos environment: # if you have your own mysql, config it here, and disable the 'mysql' config blow - MYSQL_URL=rap2-mysql # links will maintain /etc/hosts, just use 'container_name' - MYSQL_PORT=3306 - MYSQL_USERNAME=root - MYSQL_PASSWD= - MYSQL_SCHEMA=rap2 # redis config - REDIS_URL=rap2-redis - REDIS_PORT=6379 # production / development - NODE_ENV=production working_dir: /app privileged: true command: node dispatch.js links: - redis - mysql depends_on: - redis - mysql ports: - "38080:8080" # expose 38080 redis: container_name: rap2-redis image: redis:4.0.9 # disable this if you have your own mysql mysql: container_name: rap2-mysql image: mysql:5.7.22 # expose 33306 to client (navicat) #ports: # - 33306:3306 volumes: # change it to your own path # WARNING: without this line, your data will be lost. - "./mysql:/var/lib/mysql" environment: MYSQL_ALLOW_EMPTY_PASSWORD: "true" MYSQL_DATABASE: "rap2" MYSQL_USER: "root" MYSQL_PASSWORD: ""