summaryrefslogtreecommitdiffstats
path: root/.devcontainer/docker-compose.yml
blob: 9ca7a4ac5b74fb3873b3217c4006bb19cb66f717 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: "3"

services: 
  php:
    # Uncomment the next line to use a non-root user for all processes.
    # See https://aka.ms/vscode-remote/containers/non-root for details.
    # user: vscode

    build:
      context: .
      dockerfile: Dockerfile
      args:
        # Update VARIANT to pick a PHP version: 7, 7.4, 7.3
        VARIANT: "7.4"
        INSTALL_NODE: "true"
        NODE_VERSION: "lts/*"
        USER_UID: 1000
        USER_GID: 1000

    volumes:
      - ..:/workspace:cached

    ports:
      # For use with PHP (e.g. `php -S localhost:8080`)
      - "8080:8080"

    # Overrides default command so things don't shut down after the process ends.
    command: sleep infinity

    links:
      - mariadb

    environment:
      MYSQL_HOST: mariadb

  mariadb:
    image: mariadb:10.4
    expose:
      # Expose mariadb port to php service (Access as hostname "mariadb" from within php container)
      - "3306"
    # Uncomment to allow access to mariadb from external tools
    # ports:
    #     - "3306:3306"
    restart: unless-stopped
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 1
      MYSQL_DATABASE: shim_test