Rename pharos-dashboard and pharos-validator
[pharos-tools.git] / dashboard / docker-compose.yml
1 ---
2 ##############################################################################
3 # Copyright (c) 2016 Max Breitenfeldt and others.
4 #
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11
12 version: '2'
13 services:
14     nginx:
15         restart: always
16         image: nginx:latest
17         container_name: ng01
18         ports:
19             - "80:80"
20         volumes:
21             - ./config/nginx:/etc/nginx/conf.d
22             - /var/lib/pharos_dashboard/static:/static
23             - /var/lib/pharos_dashboard/media:/media
24         depends_on:
25             - web
26
27     web:
28         restart: always
29         build: ./web/
30         container_name: dg01
31         # yamllint disable rule:line-length
32         command: bash -c "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn pharos_dashboard.wsgi -b 0.0.0.0:8000"
33         # yamllint enable rule:line-length
34         depends_on:
35             - postgres
36         links:
37             - postgres
38         env_file: config.env
39         volumes:
40             - ./:/pharos_dashboard
41             - /var/lib/pharos_dashboard/static:/static
42             - /var/lib/pharos_dashboard/media:/media
43         expose:
44             - "8000"
45
46     postgres:
47         restart: always
48         image: postgres:latest
49         container_name: ps01
50         env_file: config.env
51         volumes:
52             - ./config/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
53             - pharos-data:/var/lib/postgresql/data
54
55     rabbitmq:
56         restart: always
57         build: ./rabbitmq/
58         container_name: rm01
59         env_file: config.env
60         ports:
61             - "5672:5672"
62
63     worker:
64         restart: always
65         build: ./worker/
66         # yamllint disable rule:line-length
67         command: bash -c "celery -A pharos_dashboard worker -l info -B --schedule=~/celerybeat-schedule"
68         # yamllint enable rule:line-length
69         env_file: config.env
70         links:
71             - postgres
72             - rabbitmq
73         volumes:
74             - ./:/pharos_dashboard
75 volumes:
76     pharos-data:
77         external: true