docker-compose.yml 2.2 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:test
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:test
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
            #- ./vidjil-server/conf:/etc/vidjil
33
    nginx:
34
        image: vidjil/client:test
35 36 37 38 39 40 41
        depends_on:
            - uwsgi
        links:
                - uwsgi:uwsgi
        ports:
            - "80:80"
            - "443:443"
42
        command: bash /entrypoints/nginx-entrypoint.sh
43 44
        volumes:
            - /opt/vidjil/log/nginx:/var/log/nginx
45
            - /etc/nginx/ssl:/etc/nginx/ssl
46 47

    workers:
48
        image: vidjil/server:test
49
        command: /usr/local/bin/gosu www-data python /usr/share/vidjil/server/web2py/web2py.py -K vidjil,vidjil,vidjil
50 51
        volumes_from:
            - uwsgi
52 53 54 55 56
        depends_on:
            - uwsgi
            - mysql
        links:
            - mysql
57
    backup:
58
        image: vidjil/server:test
59 60 61 62 63
        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
64 65 66
    reporter:
        build: ./reporter
        image: reporter:test
67 68
        volumes_from:
            - uwsgi
69 70 71 72
        volumes:
            - ./reporter/code:/opt/reporter
        depends_on:
            - uwsgi
73
        links:
74
            - uwsgi:uwsgi