123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- version: '3.4'
- services:
- # php-server:
- # image: jianboy/syoqi:latest
- # build:
- # context: .
- # dockerfile: ./Dockerfile
- # command: [ "sh", "-c", "php -S " ]
- # ports:
- # - 8080:8080
- # volumes:
- # - .:/var/www/html
- # networks:
- # - default
- # depends_on:
- # - mysql
- # # - redis
- nginx:
- container_name: survey_nginx
- image: nginx:alpine
- restart: always
- ports:
- - 8081:80
- # depends_on:
- # - phpfpm
- environment:
- - TZ=Asia/Shanghai
- working_dir: /var/www
- # volumes_from:
- # - phpfpm
- volumes:
- - ./nginx/vhost.conf:/etc/nginx/conf.d/default.conf
- - ./nginx/log:/etc/nginx/log
- - ./../web:/var/www/public
- networks:
- survey_net:
- ipv4_address: 192.168.10.80
- # mysql:
- # container_name: survey_mysql
- # image: mysql:5.7
- # environment:
- # MYSQL_ROOT_PASSWORD: root
- # MYSQL_DATABASE: test
- # MYSQL_USER: lyq
- # MYSQL_PASSWORD: 123456
- # ports:
- # - 3306:3306
- # volumes:
- # # - mysql:/var/lib/mysql
- # - ./mysql/my.cnf:/etc/mysql/my.cnf
- # - ./mysql/data:/var/lib/mysql
- # - ./mysql/log:/var/log/mysql
- # # privileged: true
- # command:
- # --character-set-server=utf8mb4
- # --collation-server=utf8mb4_general_ci
- # --explicit_defaults_for_timestamp=true
- # --lower_case_table_names=1
- # --max_allowed_packet=128M
- # --default-authentication-plugin=mysql_native_password
- # --sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
- # working_dir: /var/lib/mysql
- # networks:
- # survey_net:
- # ipv4_address: 192.168.10.81
- # redis:
- # image: redis:latest
- # ports:
- # - 6379:6379
- # volumes:
- # - redis:/data
- # networks:
- # - survey_net
- networks:
- survey_net:
- driver: bridge
- ipam: #网络配置
- config:
- - subnet: 192.168.0.0/16 #IP区间
- gateway: 192.168.10.100
- # volumes:
- # mysql:
- # external:
- # name: mysql
- # redis:
- # external:
- # name: redis
|