docker-compose.local.yml 1.3 KB
Newer Older
carlosribas's avatar
carlosribas committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
version: '3'

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}
21
    command: python rnacentral/manage.py runserver 0.0.0.0:8000
carlosribas's avatar
carlosribas committed
22 23 24 25
    ports:
      - 8000:8000
    volumes:
      - ./openssl/openssl.cnf:/etc/ssl/openssl.cnf
26 27
      - ./rnacentral:/srv/rnacentral/rnacentral-webcode/rnacentral
      - .env:/srv/rnacentral/rnacentral-webcode/.env
carlosribas's avatar
carlosribas committed
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
    depends_on:
      - redis
    networks:
      - redis-network
      - memcached-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:
      - 8052:8052
    command: memcached -m 512m -p 8052
    depends_on:
      - rnacentral
    networks:
      - memcached-network

networks:
  redis-network:
    driver: bridge
  memcached-network:
    driver: bridge