#项目文件.yml示例
version: '3.4' services: fire.api: image: fireapi:1.0 container_name: fireapi build: context: ./storage/fireapi dockerfile: Dockerfile ports: - 11001:80 environment: TZ: Asia/Shanghai LANG: zh_CN.UTF-8 restart: always fire.miniprogram: image: fireminiprogram:1.0 container_name: fireminiprogram build: context: ./storage/fireminiprogram dockerfile: Dockerfile ports: - 8000:80 environment: TZ: Asia/Shanghai LANG: zh_CN.UTF-8 restart: always fire.redis: image: redis:6.0 container_name: fireredis ports: - 6379:6379 command: redis-server /etc/redis.conf volumes: - /app/storage/redis/redis.conf:/etc/redis.conf:rw - /app/storage/redis/data:/data:rw environment: TZ: Asia/Shanghai LANG: zh_CN.UTF-8 restart: always fire.nginx: image: nginx:1.19 container_name: firenginx ports: - 80:80 - 443:443 volumes: - /app/storage/nginx/nginx.conf:/etc/nginx/nginx.conf - /app/storage/nginx/cert:/etc/nginx/cert #- /app/storage/nginx/log:/var/log/nginx #- /app/storage/nginx/html:/usr/share/nginx/html environment: TZ: Asia/Shanghai LANG: zh_CN.UTF-8 restart: always
注:特别注意格式要对齐,不然会报错。