version: '3.2' services: reverse-proxy: # The official v2.0 Traefik docker image image: traefik:v2.0 # Enables the web UI and tells Traefik to listen to docker command: --log.level=INFO --api.insecure=true --providers.docker --entrypoints.web.address=:80 --entrypoints.websecure.address=:443 ports: # The HTTP port - "8078:80" # The HTTPS port - "8080:443" # The Web UI (enabled by --api.insecure=true) - "8090:8080" volumes: # So that Traefik can listen to the Docker events - /var/run/docker.sock:/var/run/docker.sock nginx: build: ./nginx ports: - '8079:8080' volumes: - ..:/usr/share/nginx/html # Overwrite the default configuration. Our conf is based on it - ../sysadmin/nginx/docker:/etc/nginx/conf.d/default.conf depends_on: - php-fpm - mysql links: - php-fpm labels: traefik.enable: 'true' traefik.http.routers.coursetable-main.rule: HostRegexp(`{catchall:.*}`) traefik.http.routers.coursetable-main-ssl.tls: 'true' traefik.http.routers.coursetable-main-ssl.rule: HostRegexp(`{catchall:.*}`) traefik.http.services.coursetable-nginx.loadbalancer.server.port: '8080' # Run a single script to make sure we have data files php: build: ./php volumes: - ..:/var/www/html command: sh -c 'php composer.phar install && /wait-for mysql:3306 -t 300 -- php scripts/RegenerateDataFiles.php --dev' working_dir: /var/www/html depends_on: - mysql php-fpm: env_file: ../crawler/facebook.env build: ./php volumes: - ..:/usr/share/nginx/html mysql: build: ./mysql command: --default-authentication-plugin=mysql_native_password restart: always environment: MYSQL_ROOT_PASSWORD: GoCourseTable ports: - '3306:3306' volumes: # This will get used to initialize the database: see # "Initializing a fresh instance" # in https://hub.docker.com/_/mariadb - ./mysql/database.sql:/docker-entrypoint-initdb.d/00-database.sql phpmyadmin: build: ./phpmyadmin depends_on: - mysql restart: always environment: PMA_HOST: mysql MYSQL_ROOT_PASSWORD: GoCourseTable ports: - '8081:80' nodejs: image: node:lts-alpine volumes: - ..:/var/www/html working_dir: /var/www/html command: npm run install-and-watch