docker-compose.yml 1.44 KB
Newer Older
Konstantin Schulz's avatar
Konstantin Schulz committed
1 2 3
version: '3.7'

services:
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
  csm:
    build:
      context: ./mc_backend
      dockerfile: Dockerfile
    command: /home/mc/venv/bin/gunicorn -c csm/gunicorn_config.py run_csm:app
    depends_on:
      - db
    environment:
      - FLASK_APP=run_csm.py
      - IS_THIS_A_DOCKER_CONTAINER=Yes
      - PYTHONPATH=/home/mc
    ports:
      - "6555:6555"
    restart: always
    stdin_open: true
  db:
    image: postgres
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
23 24
#    ports:
#    - "5432:5432"
25 26 27
    restart: always
    volumes:
      - db-data:/var/lib/postgresql/data
Konstantin Schulz's avatar
Konstantin Schulz 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
  mc_frontend:
    build:
      context: ./mc_frontend
      dockerfile: Dockerfile
    entrypoint: ng build --prod app
    environment:
      - CHROME_BIN=google-chrome
    stdin_open: true
    tty: true
    volumes:
      - $PWD/mc_frontend/www:/home/mc/mc_frontend/www
  mcserver:
    build:
      context: ./mc_backend
      dockerfile: Dockerfile
    command: /home/mc/venv/bin/gunicorn -c mcserver/gunicorn_config.py app:app
    depends_on:
      - db
    environment:
      - FLASK_APP=app.py
      - IS_THIS_A_DOCKER_CONTAINER=Yes
      - PYTHONPATH=/home/mc
    ports:
      - "5000:5000"
    restart: always
    stdin_open: true
54 55 56 57 58 59 60 61 62
  nginx:
    command: nginx -g "daemon off;"
    image: nginx:alpine
    ports:
      - "8100:80"
    restart: always
    volumes:
      - $PWD/mc_frontend/www:/usr/share/nginx/html
      - ./mc_frontend/nginx.conf:/etc/nginx/nginx.conf
Konstantin Schulz's avatar
Konstantin Schulz committed
63 64
volumes:
  db-data: