docker-compose.yml 1.53 KB
Newer Older
1
version: '3.3'
2 3
services:
    redis:
4
        image: redis:alpine
5 6 7 8
        command: >
            sh -c "redis-server
            && redis-cli CONFIG SET maxmemory 4gb
            && redis-cli CONFIG SET maxmemory-policy allkeys-lru"
9
    rabbitmq:
10
        image: rabbitmq:alpine
11
    app:
12
        image: sherzinger/fractalis:0.6.2
13 14
        volumes:
            - ./config/fractalis/config.py:/config.py
15
            - ./config/fractalis/logging.yaml:/logging.yaml
16
        environment:
17
            - FRACTALIS_CONFIG=/config.py
18
        command: gunicorn -w 3 -b :5000 --log-file - --access-logfile - fractalis:app
19
        expose:
20
            - 5000
21 22 23 24
        depends_on:
            - redis
            - rabbitmq
    worker:
25
        image: sherzinger/fractalis:0.6.2
26 27
        volumes:
            - ./config/fractalis/config.py:/config.py
28
            - ./config/fractalis/logging.yaml:/logging.yaml
29
        environment:
30
            - FRACTALIS_CONFIG=/config.py
31
        command: celery worker -A fractalis:celery -l warning --autoscale 16,4
32 33 34 35
        depends_on:
            - redis
            - rabbitmq
    nginx:
36
        image: nginx:alpine
37 38 39 40 41 42
        volumes:
            - ./config/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
            - ./config/nginx/html:/usr/share/nginx/html
            - ./config/nginx/certs/server.crt:/etc/nginx/server.crt
            - ./config/nginx/certs/server.key:/etc/nginx/server.key
        ports:
43 44
            - ${FRACTALIS_HTTP_PORT:-80}:80
            - ${FRACTALIS_HTTPS_PORT:-443}:443
45 46
        depends_on:
            - app