1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- version: '3'
- services:
- nginx:
- image: nginx
- ports:
- - "${APP_PORT}:80"
- volumes:
- - ./docker/site.conf:/etc/nginx/conf.d/default.conf
- - ./:/var/www
- links:
- - php
- depends_on:
- - php
- restart: unless-stopped
- php:
- hostname: php
- build:
- context: .
- dockerfile: docker/php.Dockerfile
- volumes:
- - ./:/var/www
- environment:
- TZ: "Asia/Shanghai"
- links:
- - mariadb
- depends_on:
- - mariadb
- mariadb:
- hostname: mariadb
- image: mariadb
- command: --default-authentication-plugin=mysql_native_password
- environment:
- - "MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}"
- - "MYSQL_DATABASE=${DB_DATABASE}"
- - "MYSQL_USER=${DB_USERNAME}"
- - "MYSQL_PASSWORD=${DB_PASSWORD}"
- restart: always
- nodejs:
- hostname: nodejs
- image: node:12.18.0
- working_dir: /var/www
- volumes:
- - ./:/var/www
|