docker-compose.yml 1.18 KB
Newer Older
1
2
version: '3.5'

Thom Wiggers's avatar
Thom Wiggers committed
3
4
5
services:
    postgres:
        image: postgres
Thom Wiggers's avatar
Thom Wiggers committed
6
7
        volumes:
            - /var/lib/postgresql/
Thom Wiggers's avatar
Thom Wiggers committed
8
9
        environment: &postgresvars
            POSTGRES_DB: thalia
10
11
12
13
14
    redis:
        image: redis:4.0.9
        command: redis-server --appendonly yes
        volumes:
          - redis:/data
Thom Wiggers's avatar
Thom Wiggers committed
15
    web:
Thom Wiggers's avatar
Thom Wiggers committed
16
        image: registry.gitlab.com/thaliawww/concrexit
Thom Wiggers's avatar
Thom Wiggers committed
17
18
19
20
21
22
        build: .
        command: runserver 0.0.0.0:8000
        ports:
            - 8000:8000
        depends_on:
            - postgres
23
            - redis
Thom Wiggers's avatar
Thom Wiggers committed
24
        volumes:
25
            - ./website:/usr/src/app/website/
26
            - concrexit:/concrexit/
27
        environment: &webvars
Thom Wiggers's avatar
Thom Wiggers committed
28
29
30
            <<: *postgresvars
            DJANGO_DEBUG: 'True'
            DJANGO_POSTGRES_HOST: postgres
31
32
33
34
35
            CELERY_REDIS_HOST: redis
    celery:
        image: registry.gitlab.com/thaliawww/concrexit
        build: .
        entrypoint: /usr/local/bin/entrypoint_celery.sh
36
37
38
        volumes:
            - ./website:/usr/src/app/website/
            - concrexit:/concrexit/
39
40
41
42
43
        depends_on:
          - redis
        environment:
            <<: *webvars

Thom Wiggers's avatar
Thom Wiggers committed
44
volumes:
45
    concrexit:
Thom Wiggers's avatar
Thom Wiggers committed
46
        driver: local
47
48
    redis:
        driver: local