docker-compose.yml 1.46 KB
Newer Older
Konstantin Schulz's avatar
Konstantin Schulz committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
54
55
56
57
58
59
60
61
62
63
64
65
66
version: '3.7'

services:
  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
  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
    depends_on:
      - mc_frontend
  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:
      - "8122:22"
      - "6555:6555"
    restart: always
    stdin_open: true
  db:
    image: postgres
    ports:
      - "5432:5432"
    restart: always
    volumes:
      - db-data:/var/lib/postgresql/data
  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:
      - "8022:22"
      - "5000:5000"
    restart: always
    stdin_open: true
volumes:
  db-data: