version: '3.3'

services:
  cache:
    image: redis:6.2-alpine
    restart: always
    networks:
      - ussd-upgrade_default
    ports:
      - '6379:6379'
    command: redis-server --save 20 1 --loglevel warning
    volumes:
      - cache:/data

  ussd-app:
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - ussd-upgrade_default
    environment:
      - SERVER=https://eapps.enterprisegroup.net.gh:3036
    env_file:
      - .env
    expose:
      - "80"
      - "443"
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - ${APP_PORT}:443
    depends_on:
      - cache

volumes:
  cache:
    driver: local

networks:
  ussd-upgrade_default:
