docker-compose.yaml 3.04 KB
Newer Older
Thomas Löffler's avatar
Thomas Löffler committed
1
version: '3.6'
2
#ddev-generated
3 4 5 6
services:
  db:
    container_name: ddev-${DDEV_SITENAME}-db
    image: $DDEV_DBIMAGE
7
    stop_grace_period: 60s
8
    volumes:
Thomas Löffler's avatar
Thomas Löffler committed
9 10 11 12 13 14 15 16 17 18 19
      - type: "volume"
        source: mariadb-database
        target: "/var/lib/mysql"
        volume:
          nocopy: true
      - type: "bind"
        source: "${DDEV_IMPORTDIR}"
        target: "/db"
      - type: "bind"
        source: "."
        target: "/mnt/ddev_config"
20 21
    restart: "no"
    user: "$DDEV_UID:$DDEV_GID"
22 23 24 25 26 27 28 29 30
    ports:
      - "3306"
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.platform: ddev
      com.ddev.app-type: typo3
      com.ddev.approot: $DDEV_APPROOT
      com.ddev.app-url: $DDEV_URL
    environment:
31 32
      - COLUMNS=$COLUMNS
      - LINES=$LINES
Thomas Löffler's avatar
Thomas Löffler committed
33
    command: "$DDEV_MARIADB_LOCAL_COMMAND"
34 35 36 37 38
  web:
    container_name: ddev-${DDEV_SITENAME}-web
    image: $DDEV_WEBIMAGE
    volumes:
      - "../:/var/www/html:cached"
Thomas Löffler's avatar
Thomas Löffler committed
39
      - ".:/mnt/ddev_config:ro"
40 41
    restart: "no"
    user: "$DDEV_UID:$DDEV_GID"
42 43 44 45 46 47 48 49 50 51 52 53 54
    depends_on:
      - db
    links:
      - db:db
    # ports is list of exposed *container* ports
    ports:
      - "80"
      - "8025"
    working_dir: /var/www/html/${DDEV_DOCROOT}
    environment:
      - DDEV_URL=$DDEV_URL
      - DOCROOT=$DDEV_DOCROOT
      - DDEV_PHP_VERSION=$DDEV_PHP_VERSION
Thomas Löffler's avatar
Thomas Löffler committed
55
      - DDEV_WEBSERVER_TYPE=$DDEV_WEBSERVER_TYPE
56 57 58
      - DDEV_PROJECT_TYPE=$DDEV_PROJECT_TYPE
      - DDEV_ROUTER_HTTP_PORT=$DDEV_ROUTER_HTTP_PORT
      - DDEV_ROUTER_HTTPS_PORT=$DDEV_ROUTER_HTTPS_PORT
59
      - DDEV_XDEBUG_ENABLED=$DDEV_XDEBUG_ENABLED
60 61
      - DEPLOY_NAME=local
      - VIRTUAL_HOST=$DDEV_HOSTNAME
62 63
      - COLUMNS=$COLUMNS
      - LINES=$LINES
64 65 66 67 68 69 70 71 72 73 74 75
      # HTTP_EXPOSE allows for ports accepting HTTP traffic to be accessible from <site>.ddev.local:<port>
      # To expose a container port to a different host port, define the port as hostPort:containerPort
      - HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,8025
      # You can optionally expose an HTTPS port option for any ports defined in HTTP_EXPOSE.
      # To expose an HTTPS port, define the port as securePort:containerPort.
      - HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.platform: ddev
      com.ddev.app-type: typo3
      com.ddev.approot: $DDEV_APPROOT
      com.ddev.app-url: $DDEV_URL
76
    extra_hosts: ["unneeded:127.0.0.1"]
77 78 79
  dba:
    container_name: ddev-${DDEV_SITENAME}-dba
    image: $DDEV_DBAIMAGE
80
    restart: "no"
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
    labels:
      com.ddev.site-name: ${DDEV_SITENAME}
      com.ddev.platform: ddev
      com.ddev.app-type: typo3
      com.ddev.approot: $DDEV_APPROOT
      com.ddev.app-url: $DDEV_URL
    depends_on:
      - db
    links:
      - db:db
    ports:
      - "80"
    environment:
      - PMA_USER=db
      - PMA_PASSWORD=db
      - VIRTUAL_HOST=$DDEV_HOSTNAME
      # HTTP_EXPOSE allows for ports accepting HTTP traffic to be accessible from <site>.ddev.local:<port>
      - HTTP_EXPOSE=8036
networks:
  default:
    external:
      name: ddev_default
Thomas Löffler's avatar
Thomas Löffler committed
103 104 105 106
volumes:
  mariadb-database:
    name: "${DDEV_SITENAME}-mariadb"