123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- version: "3"
- networks:
- network:
- ipam:
- driver: default
- config:
- - subnet: '177.7.0.0/16'
- services:
- web:
- build:
- context: ./web
- dockerfile: ./Dockerfile
- container_name: gva-web
- restart: always
- ports:
- - '8080:8080'
- depends_on:
- - server
- command: [ 'nginx-debug', '-g', 'daemon off;' ]
- networks:
- network:
- ipv4_address: 177.7.0.11
- server:
- build:
- context: ./server
- dockerfile: ./Dockerfile
- container_name: gva-server
- restart: always
- ports:
- - '8888:8888'
- depends_on:
- - mysql
- - redis
- links:
- - mysql
- - redis
- networks:
- network:
- ipv4_address: 177.7.0.12
- mysql:
- image: mysql:8.0.21
- container_name: gva-mysql
- command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci #设置utf8字符集
- restart: always
- ports:
- - "13306:3306" # host物理直接映射端口为13306
- environment:
- MYSQL_DATABASE: 'qmPlus' # 初始化启动时要创建的数据库的名称
- MYSQL_ROOT_PASSWORD: 'Aa@6447985' # root管理员用户密码
- networks:
- network:
- ipv4_address: 177.7.0.13
- redis:
- image: redis:6.0.6
- container_name: gva-redis # 容器名
- restart: always
- ports:
- - '16379:6379'
- networks:
- network:
- ipv4_address: 177.7.0.14
|