1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| services: education-api: build: ./ image: education-api:1.0 container_name: education-api ports: - 8001:8001 depends_on: - mymysql - myredis - myrabbitmq - mynginx mymysql: image: mysql:5.7.25 container_name: mysql1 environment: MYSQL_ROOT_PASSWORD: root ports: - 3306:3306 volumes: - /usr/local/mysql/data:/var/lib/mysql - /usr/local/mysql:/etc/mysql/conf.d - /usr/local/mysql/log:/var/log/mysql myredis: image: redis:latest container_name: redis1 ports: - 6379:6379 volumes: - /usr/local/redis/data:/data - /usr/local/redis/redis.conf:/usr/local/etc/redis/redis.conf myrabbitmq: image: rabbitmq:3-management container_name: rabbitmq1 ports: - 5672:5672 - 15672:15672 mynginx: image: nginx:latest container_name: nginx1 ports: - 80:80 volumes: - /usr/local/nginx/html:/usr/share/nginx/html - /usr/local/nginx/nginx.conf:/etc/nginx/nginx.conf privileged: true
|