docker-compose.yaml 2.7 KB
Newer Older
1
version: '3'
2
#ddev-generated
3
4
5
6
services:
  db:
    container_name: ddev-${DDEV_SITENAME}-db
    image: $DDEV_DBIMAGE
7
    stop_grace_period: 60s
8
9
10
    volumes:
      - "${DDEV_IMPORTDIR}:/db"
      - "${DDEV_DATADIR}:/var/lib/mysql"
11
12
13
      - ".:/mnt/ddev_config"
    restart: "no"
    user: "$DDEV_UID:$DDEV_GID"
14
15
16
17
18
19
20
21
22
    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:
23
24
25
      - COLUMNS=$COLUMNS
      - LINES=$LINES

26
27
28
29
30
  web:
    container_name: ddev-${DDEV_SITENAME}-web
    image: $DDEV_WEBIMAGE
    volumes:
      - "../:/var/www/html:cached"
31
32
33
      - ".:/mnt/ddev_config"
    restart: "no"
    user: "$DDEV_UID:$DDEV_GID"
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
    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
      - DDEV_PROJECT_TYPE=$DDEV_PROJECT_TYPE
      - DDEV_ROUTER_HTTP_PORT=$DDEV_ROUTER_HTTP_PORT
      - DDEV_ROUTER_HTTPS_PORT=$DDEV_ROUTER_HTTPS_PORT
50
      - DDEV_XDEBUG_ENABLED=$DDEV_XDEBUG_ENABLED
51
52
      - DEPLOY_NAME=local
      - VIRTUAL_HOST=$DDEV_HOSTNAME
53
54
      - COLUMNS=$COLUMNS
      - LINES=$LINES
55
56
57
58
59
60
61
62
63
64
65
66
      # 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
67
    extra_hosts: ["unneeded:127.0.0.1"]
68
69
70
  dba:
    container_name: ddev-${DDEV_SITENAME}-dba
    image: $DDEV_DBAIMAGE
71
    restart: "no"
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
    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