Skip to content
docker-compose.yml 732 B
Newer Older
Pierre Ozoux's avatar
Pierre Ozoux committed
db:
  image: mysql
  volumes:
    - ./mysql/runtime:/var/lib/mysql
  environment:
Pierre Ozoux's avatar
Pierre Ozoux committed
    - MYSQL_ROOT_PASSWORD
Pierre Ozoux's avatar
Pierre Ozoux committed
app:
  image: piwik
  links:
    - db
  volumes:
    - ./config:/var/www/html/config
    - ./ssmtp.conf:/etc/ssmtp/ssmtp.conf
    - ./revaliases:/etc/ssmtp/revaliases
web:
  image: nginx
  volumes:
    - ./nginx.conf:/etc/nginx/nginx.conf:ro
  links:
    - app
  volumes_from:
    - app
Pierre Ozoux's avatar
Pierre Ozoux committed
  environment:
    - VIRTUAL_HOST
cron:
  image: piwik
  links:
    - db
  volumes_from:
    - app
  entrypoint: |
    bash -c 'bash -s <<EOF
    trap "break;exit" SIGHUP SIGINT SIGTERM
    while /bin/true; do
      su -s "/bin/bash" -c "/usr/local/bin/php /var/www/html/console core:archive" www-data
      sleep 3600
    done
    EOF'