docker-compose.yml

mail@pastecode.io avatar
unknown
yaml
2 years ago
1.4 kB
2
Indexable
Never
version: "3.7"
services:
  php:
    labels:
      version: 8.0
    build:
      context: "./docker/php"
      args:
        PHP_VERSION: 8.0
    environment:
      COMPOSER_MEMORY_LIMIT: -1
    networks:
      - backend
    working_dir: /usr/local/apache2/htdocs
    volumes:
      - .:/usr/local/apache2/htdocs
    container_name: ep_php
    extra_hosts:
      - "host.docker.internal:host-gateway"
    command:
      - sh

  apache:
    labels:
      version: 2.4
    build:
      context: "./docker/apache"
      args:
        APACHE_VERSION: 2.4
    depends_on:
      - php
      - mysql
    networks:
      - frontend
      - backend
    ports:
      - "443:443"
    working_dir: /usr/local/apache2/htdocs
    volumes:
      - .:/usr/local/apache2/htdocs
    container_name: ep_apache

  mysql:
    image: mysql:8.0.30
    restart: always
    # Seems like not needed; leaving for quick revert
    #        ports:
    #            - "3306:3306"
    volumes:
      - data:/var/lib/mysql
    networks:
      - backend
    environment:
      MYSQL_ROOT_PASSWORD: "eproot"
      MYSQL_DATABASE: "ep"
      MYSQL_USER: "ep"
      MYSQL_PASSWORD: "ep"
      MYSQL_INITDB_SKIP_TZINFO: "true"
      TZ: Europe/London
    container_name: ep_mysql

networks:
  frontend:
  backend:

volumes:
  data: