-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.local.yml
100 lines (94 loc) · 2.35 KB
/
docker-compose.local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Set the Docker Compose file format
version: '3'
# Define the services (containers) that make up the project
services:
# RNAcentral website
rnacentral:
build:
context: .
dockerfile: Dockerfile-local
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_PORT=${DB_PORT}
- SECRET_KEY=${SECRET_KEY}
- DJANGO_DEBUG=${DJANGO_DEBUG}
- S3_HOST=${S3_HOST}
- S3_KEY=${S3_KEY}
- S3_SECRET=${S3_SECRET}
- EBI_SEARCH_ENDPOINT=${EBI_SEARCH_ENDPOINT}
command: python rnacentral/manage.py runserver 0.0.0.0:8000
ports:
- 8000:8000
volumes:
- ./rnacentral:/srv/rnacentral/rnacentral-webcode/rnacentral
- .env:/srv/rnacentral/rnacentral-webcode/.env
depends_on:
- redis
networks:
- redis-network
- memcached-network
# rqworker - used to export search results
rqworker:
build:
context: .
dockerfile: Dockerfile-local
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_PORT=${DB_PORT}
- SECRET_KEY=${SECRET_KEY}
- DJANGO_DEBUG=${DJANGO_DEBUG}
- S3_HOST=${S3_HOST}
- S3_KEY=${S3_KEY}
- S3_SECRET=${S3_SECRET}
- EBI_SEARCH_ENDPOINT=${EBI_SEARCH_ENDPOINT}
command: python rnacentral/manage.py rqworker
volumes:
- ./rnacentral:/srv/rnacentral/rnacentral-webcode/rnacentral
- .env:/srv/rnacentral/rnacentral-webcode/.env
depends_on:
- redis
networks:
- redis-network
# Redis server
redis:
image: redis:6.0.8-alpine
ports:
- 8051:8051
command: redis-server --port 8051
restart: always
networks:
- redis-network
# Memcached server
memcached:
image: memcached:1.6.7-alpine
ports:
- 11211:11211
command: memcached -m 512m
depends_on:
- rnacentral
networks:
- memcached-network
# rq-dashboard - used to monitor RQ queues
dashboard:
build:
context: .
dockerfile: Dockerfile-rq
command: rq-dashboard --redis-host redis --redis-port 8051
ports:
- 9181:9181
depends_on:
- redis
networks:
- redis-network
# Define networks
networks:
redis-network:
driver: bridge
memcached-network:
driver: bridge