version: '3.7'
services:
  billetterie_postgres:
    container_name: billetterie_postgres
    image: postgres:11.5-alpine
    restart: always
    volumes:
      - "../../Postgres/dbdata:/var/lib/postgresql/data"
      - "/etc/localtime:/etc/localtime:ro"
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}

  billetterie_redis:
    container_name: billetterie_redis
    image: redis:6-alpine
    restart: always
    hostname: redis

  billetterie_django:
    container_name: billetterie_django
    build: ../Dockerfile/
#    image: registry.3peaks.re/billetterie_django:2.8-bullyeses_python38_prelog4s
    restart: always
#    ports:
#      - 8002:8002
    volumes:
      - "../../DjangoFiles:/DjangoFiles"
      - "../../Backup:/Backup"
      - "../../Docker/bashrc:/root/.bashrc"
    working_dir: /DjangoFiles
#    command: "bash /DjangoFiles/launch.sh"

  billetterie_celery:
    container_name: billetterie_celery
    build: ../Dockerfile/
#    image: registry.3peaks.re/billetterie_django:2.8-bullyeses_python38_prelog4s
    restart: always
    volumes:
      - "../../DjangoFiles:/DjangoFiles"
      - "../../Docker/bashrc:/root/.bashrc"
    working_dir: /DjangoFiles
#    command: "bash /DjangoFiles/launch.sh"


  billetterie_front_node:
    container_name: billetterie_front_node
    build: ../Dockerfile_Node
    restart: always
    volumes:
      - "../../DjangoFiles:/DjangoFiles"
      - "../../Docker/bashrc:/root/.bashrc"
    working_dir: /DjangoFiles/BaseBillet/static/blk-vue/blk-vue-cli-app

  billetterie_nginx:
    container_name: billetterie_nginx
    image: nginx
    restart: always
    volumes:
      - ../../DjangoFiles:/DjangoFiles
      - ../../Nginx:/etc/nginx/conf.d
