services:
  redis:
    image: 'redis:latest'
    expose:
      - 6379
    environment:
      - TZ=Europe/Paris

  database:
    image: 'postgres:latest'
    expose:
      - 5432
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: school
      TZ: Europe/Paris

  backend:
    image: git.v0id.ovh/n3wt-innov/n3wt-school/backend:latest
    ports:
      - 8080:8080
    environment:
      - TZ=Europe/Paris
      - TEST_MODE=True
    links:
      - "database:database"
      - "redis:redis"
    depends_on:
      - redis
      - database
    volumes:
      - ./conf/application.json:/Back-End/Subscriptions/Configuration/application.json
    command: python start.py

  frontend:
    image: git.v0id.ovh/n3wt-innov/n3wt-school/frontend:latest
    ports:
      - 3000:3000
    environment:
      - TZ=Europe/Paris
      - NODE_ENV=production
      - NEXT_PUBLIC_API_URL=http://toto:8080
    depends_on:
      - backend