docker-compose.yml 1.41 KB
Newer Older
1
version: '3.3'
2
3
services:
    redis:
4
5
6
7
8
        image: 'redis:alpine'
        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.5.2'
13
14
        volumes:
            - ./config/fractalis/config.py:/config.py
15
        environment:
16
            - FRACTALIS_CONFIG=/config.py
17
18
19
20
21
22
23
        command: gunicorn -w 3 -b :5000 --log-file gunicorn.log fractalis:app
        expose:
            - '5000'
        depends_on:
            - redis
            - rabbitmq
    worker:
24
        image: 'sherzinger/fractalis:0.5.2'
25
26
        volumes:
            - ./config/fractalis/config.py:/config.py
27
        environment:
28
            - FRACTALIS_CONFIG=/config.py
29
        command: celery worker -A fractalis:celery -l info --autoscale 16,4
30
31
32
33
        depends_on:
            - redis
            - rabbitmq
    nginx:
34
        image: 'nginx:alpine'
35
36
37
38
39
40
        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:
41
42
            - ${FRACTALIS_HTTP_PORT:-80}:80
            - ${FRACTALIS_HTTPS_PORT:-443}:443
43
44
        depends_on:
            - app