docker-compose.k8.yml 1.26 KB
Newer Older
1 2 3 4 5
version: '3'

services:
  # RNAcentral website
  rnacentral:
carlosribas's avatar
carlosribas committed
6
    image: rnacentral/rnacentral-webcode:k8
7 8 9 10 11 12 13
    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
14 15 16 17
    expose:
      - 8000
    volumes:
      - static_volume:/srv/rnacentral/static
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    depends_on:
      - redis
    networks:
      - redis-network
      - nginx-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

  # Nginx server
  nginx:
    image: nginx:1.19.2-alpine
    ports:
      - 8000:80
    volumes:
      - ../nginx/conf.d:/etc/nginx/conf.d
carlosribas's avatar
carlosribas committed
42
      - static_volume:/srv/rnacentral/static
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    depends_on:
      - rnacentral
    networks:
      - nginx-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

carlosribas's avatar
carlosribas committed
59 60 61
volumes:
  static_volume:

62 63 64 65 66 67 68
networks:
  redis-network:
    driver: bridge
  nginx-network:
    driver: bridge
  memcached-network:
    driver: bridge