docker-compose.yml 2.37 KB
Newer Older
1 2 3 4 5 6 7 8
version: '2'
services:
    mysql:
        image: mysql:5.7
        environment:
            - MYSQL_ROOT_PASSWORD=MySRPimSRP
        volumes:
            - ./mysql/:/docker-entrypoint-initdb.d/
9
            - /opt/vidjil/mysql:/var/lib/mysql
10
    uwsgi:
11
        image: vidjil/server:latest
12
        command: bash /entrypoints/uwsgi-entrypoint.sh
13 14
        volumes_from:
            - fuse
15 16 17 18 19 20 21
        depends_on:
            - mysql
            - fuse
        links:
            - mysql:mysql
            - fuse:fuse
    fuse:
22
        image: vidjil/server:latest
23
        command: bash /entrypoints/fuse-entrypoint.sh
24 25 26 27 28 29
        volumes:
            - /opt/vidjil/databases:/usr/share/vidjil/server/web2py/applications/vidjil/databases
            - /opt/vidjil/result/results:/mnt/result/results
            - /opt/vidjil/result/tmp:/mnt/result/tmp
            - /opt/vidjil/upload/uploads:/mnt/upload/uploads
            - /opt/vidjil/log:/var/vidjil
30
            - /opt/vidjil/log/uwsgi:/var/log/uwsgi
31
            - /opt/vidjil/backup:/mnt/backup
32 33
            - ./vidjil-server/conf:/etc/vidjil
            - ../germline:/usr/share/vidjil/germline
34
    nginx:
35
        image: vidjil/client:latest
36 37 38 39 40 41 42
        depends_on:
            - uwsgi
        links:
                - uwsgi:uwsgi
        ports:
            - "80:80"
            - "443:443"
43
        command: bash /entrypoints/nginx-entrypoint.sh
44 45
        volumes:
            - /opt/vidjil/log/nginx:/var/log/nginx
46
            - ./vidjil-client/ssl:/etc/nginx/ssl
47
            - ./vidjil-client/conf:/etc/vidjil
48
            - ../germline:/usr/share/vidjil/germline
49 50

    workers:
51
        image: vidjil/server:latest
52
        command: /usr/local/bin/gosu www-data python /usr/share/vidjil/server/web2py/web2py.py -K vidjil,vidjil,vidjil
53 54
        volumes_from:
            - uwsgi
55 56 57 58 59
        depends_on:
            - uwsgi
            - mysql
        links:
            - mysql
60
    backup:
61
        image: vidjil/server:latest
62 63 64 65 66
        command: bash -c "echo '0 5 * * * cd /usr/share/vidjil/server; sh backup.sh /mnt/backup 2>1&' > /etc/cron.d/backup-cron && cron"
        volumes_from:
            - uwsgi
        links:
            - mysql
67 68
    reporter:
        build: ./reporter
69
        image: reporter:latest
70 71
        volumes_from:
            - uwsgi
72 73 74 75
        volumes:
            - ./reporter/code:/opt/reporter
        depends_on:
            - uwsgi
76
        links:
77
            - uwsgi:uwsgi