docker-compose.yml 1.74 KB
Newer Older
1
version: '3.3'
2 3
services:
    redis:
4
        image: redis:alpine
5 6 7
        command: >
            sh -c "redis-server
            && redis-cli CONFIG SET maxmemory 4gb
8 9 10
            && redis-cli CONFIG SET maxmemory-policy allkeys-lru
            && redis-cli CONFIG SET save ''
            && redis-cli CONFIG SET appendonly no"
11
        restart: always
12
    rabbitmq:
13
        image: rabbitmq:alpine
14
        restart: always
15
    app:
16
        image: sherzinger/fractalis:1.3.1
17 18
        volumes:
            - ./config/fractalis/config.py:/config.py
19
            - ./config/fractalis/logging.yaml:/logging.yaml
20
        environment:
21
            - FRACTALIS_CONFIG=/config.py
22
        command: gunicorn -w 3 -b :5000 --timeout 30 --error-logfile - fractalis:app
23
        expose:
24
            - 5000
25
        restart: always
26 27 28 29
        depends_on:
            - redis
            - rabbitmq
    worker:
30
        image: sherzinger/fractalis:1.3.1
31 32
        volumes:
            - ./config/fractalis/config.py:/config.py
33
            - ./config/fractalis/logging.yaml:/logging.yaml
34
        environment:
35
            - FRACTALIS_CONFIG=/config.py
36
        command: celery worker -A fractalis:celery -l warning --autoscale 16,4
37
        restart: always
38 39 40 41
        depends_on:
            - redis
            - rabbitmq
    nginx:
42
        image: nginx:alpine
43 44 45 46 47 48
        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:
49 50
            - ${FRACTALIS_HTTP_PORT:-80}:80
            - ${FRACTALIS_HTTPS_PORT:-443}:443
51
        restart: always
52 53
        depends_on:
            - app