Skip to content
Snippets Groups Projects
docker-compose.yml 2.81 KiB
Newer Older
Ulf Seltmann's avatar
Ulf Seltmann committed
services:
  composer:
    build: devops/docker/composer
    working_dir: /usr/local/vufind
    volumes:
      - .:/usr/local/vufind:z
      - composer-data:/tmp
      - ${SSH_AUTH_SOCK}:/ssh-agent
      - $HOME/.ssh/known_hosts:/etc/ssh/ssh_known_hosts
    environment:
      SSH_AUTH_SOCK: /ssh-agent
    command: echo "Skipping composer."

Ulf Seltmann's avatar
Ulf Seltmann committed
  php:
    image: ubleipzig/vufind-php:7.2-8-debug
Ulf Seltmann's avatar
Ulf Seltmann committed
    volumes:
      - ./:/usr/local/vufind
    environment:
      VUFIND_LOCAL_DIR: /usr/local/vufind/fid/dev
Ulf Seltmann's avatar
Ulf Seltmann committed
      VUFIND_CACHE_DIR: /usr/local/vufind/data/cache
Ulf Seltmann's avatar
Ulf Seltmann committed
      VUFIND_ENV: development
      PHP_IDE_CONFIG: serverName=fid
      XDEBUG_CONFIG: >-
        remote_autostart=1
        remote_mode=req
        remote_handler=dbgp
        remote_connect_back=0
        remote_port=9000
        remote_enable=1
        remote_host=10.111.0.1
Ulf Seltmann's avatar
Ulf Seltmann committed

  httpd:
    image: ubleipzig/vufind-httpd:2.4-2
Ulf Seltmann's avatar
Ulf Seltmann committed
    ports:
      - 127.0.0.1:11100:80
Ulf Seltmann's avatar
Ulf Seltmann committed
    volumes:
Ulf Seltmann's avatar
Ulf Seltmann committed
      - ./:/usr/local/vufind:ro
      - ./data/cache:/var/cache/vufind:ro
Ulf Seltmann's avatar
Ulf Seltmann committed
    depends_on:
Ulf Seltmann's avatar
Ulf Seltmann committed
      - php
    command: httpd -D FOREGROUND -c "ProxyTimeout 3600"
Ulf Seltmann's avatar
Ulf Seltmann committed

  db:
    image: mariadb:10.2
    ports:
      - 127.0.0.1:11101:3306
Ulf Seltmann's avatar
Ulf Seltmann committed
    volumes:
      - mariadb-data:/var/lib/mysql:z
    environment:
      MYSQL_ROOT_PASSWORD: adminpw
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci

Ulf Seltmann's avatar
Ulf Seltmann committed
  smtp:
Ulf Seltmann's avatar
Ulf Seltmann committed
    image: useltmann/mailcollect:8-1
Ulf Seltmann's avatar
Ulf Seltmann committed
    ports:
Ulf Seltmann's avatar
Ulf Seltmann committed
    volumes:
      - mail-data:/home/dev/Maildir:z
Ulf Seltmann's avatar
Ulf Seltmann committed

  grunt:
    image: ubleipzig/vufind-php:7.2-8-debug
Ulf Seltmann's avatar
Ulf Seltmann committed
    volumes:
      - ./:/usr/local/vufind:z
      - npm-data:/home/www-data/.npm
Ulf Seltmann's avatar
Ulf Seltmann committed
    environment:
      NODE_ENV: development
    command: npm install && node_modules/.bin/grunt watch

  autoconfig:
    image: ubleipzig/vufind-php:7.2-8-debug
Ulf Seltmann's avatar
Ulf Seltmann committed
    volumes:
      - ./:/usr/local/vufind:z
    environment:
Ulf Seltmann's avatar
Ulf Seltmann committed
      VUFIND_INSTANCE: dev
      VUFIND_DB_CLIENT: "%"
      VUFIND_DB_ADMIN_PASSWORD: adminpw
      VF_config_ini__Authentication__hash_passwords: "true"
      VF_config_ini__Authentication__encrypt_ils_password: "true"
      VF_config_ini__Database__database: mysql://vufind:vufindpw@db/vufind
      VF_config_ini__Index__url: https://index.ub.uni-leipzig.de/solr
Ulf Seltmann's avatar
Ulf Seltmann committed
      VF_config_ini__Mail__host: smtp
      VF_config_ini__Mail__port: 25
      VF_config_ini__Mail__username: dev
      VF_config_ini__Mail__pasword: dev
    entrypoint: >
      sh -c 'sh -c "exit 1";
      while [ $$? -eq 1 ]; do nc -zv db:3306 &> /dev/null; done;
      /docker-entrypoint $$0 $$@'
    command: autoconfig vufind deploy
Ulf Seltmann's avatar
Ulf Seltmann committed
    depends_on:
      - db
Ulf Seltmann's avatar
Ulf Seltmann committed

volumes:
Ulf Seltmann's avatar
Ulf Seltmann committed
  mail-data: {}
Ulf Seltmann's avatar
Ulf Seltmann committed
  mariadb-data: {}
Ulf Seltmann's avatar
Ulf Seltmann committed

networks:
  default:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 10.111.0.0/24
          gateway: 10.111.0.1