docker-compose.yml 1.52 KB
Newer Older
carlosribas's avatar
carlosribas committed
1
version: '3'
2 3 4

services:
  # RNAcentral website
carlosribas's avatar
carlosribas committed
5
  rnacentral:
6 7
    build:
      context: .
carlosribas's avatar
carlosribas committed
8
      args:
9
        - LOCAL_DEVELOPMENT=${LOCAL_DEVELOPMENT}
10 11 12 13 14 15 16
    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}
carlosribas's avatar
carlosribas committed
17 18 19 20
      - DJANGO_DEBUG=${DJANGO_DEBUG}
      - S3_HOST=${S3_HOST}
      - S3_KEY=${S3_KEY}
      - S3_SECRET=${S3_SECRET}
21
      - EBI_SEARCH_ENDPOINT=${EBI_SEARCH_ENDPOINT}
22 23 24
    expose:
      - 8000
    volumes:
25
      - static_volume:/srv/rnacentral/static
26
      - ./openssl/openssl.cnf:/etc/ssl/openssl.cnf
carlosribas's avatar
carlosribas committed
27 28 29
    depends_on:
      - redis
    networks:
carlosribas's avatar
carlosribas committed
30 31 32
      - redis-network
      - nginx-network
      - memcached-network
carlosribas's avatar
carlosribas committed
33 34 35

  # Redis server
  redis:
carlosribas's avatar
carlosribas committed
36
    image: redis:6.0.8-alpine
carlosribas's avatar
carlosribas committed
37
    ports:
38
      - 8051:8051
carlosribas's avatar
carlosribas committed
39 40 41
    command: redis-server --port 8051
    restart: always
    networks:
carlosribas's avatar
carlosribas committed
42
      - redis-network
43

carlosribas's avatar
carlosribas committed
44 45
  # Nginx server
  nginx:
carlosribas's avatar
carlosribas committed
46
    image: nginx:1.20-alpine
carlosribas's avatar
carlosribas committed
47 48 49 50
    ports:
      - 8000:80
    volumes:
      - ./nginx/conf.d:/etc/nginx/conf.d
51
      - static_volume:/srv/rnacentral/static
carlosribas's avatar
carlosribas committed
52 53 54
    depends_on:
      - rnacentral
    networks:
carlosribas's avatar
carlosribas committed
55 56 57 58 59 60
      - nginx-network

  # Memcached server
  memcached:
    image: memcached:1.6.7-alpine
    ports:
61
      - 8052:8052
carlosribas's avatar
carlosribas committed
62 63 64 65 66
    command: memcached -m 512m -p 8052
    depends_on:
      - rnacentral
    networks:
      - memcached-network
carlosribas's avatar
carlosribas committed
67

68 69 70
volumes:
  static_volume:

carlosribas's avatar
carlosribas committed
71
networks:
carlosribas's avatar
carlosribas committed
72 73 74
  redis-network:
    driver: bridge
  nginx-network:
carlosribas's avatar
carlosribas committed
75
    driver: bridge
carlosribas's avatar
carlosribas committed
76
  memcached-network:
carlosribas's avatar
carlosribas committed
77
    driver: bridge