docker-compose.yml 1.06 KB
Newer Older
1
version: '3.4'
Mart Lubbers's avatar
Mart Lubbers committed
2 3
services:
  backend:
4 5 6
    build:
      context: .
      dockerfile: backend/Dockerfile
7
      target: runner
8 9 10 11
    ports:
      - "31215:31215"
    volumes:
      - "./cloogle.log:/usr/src/cloogle/cloogle.log"
Mart Lubbers's avatar
Mart Lubbers committed
12
      - "./cache:/usr/src/cloogle/cache"
Mart Lubbers's avatar
Mart Lubbers committed
13
    restart: always
Camil Staps's avatar
Camil Staps committed
14 15
    cap_add:
      - IPC_LOCK
Mart Lubbers's avatar
Mart Lubbers committed
16 17

  frontend:
18 19 20
    build:
      context: .
      dockerfile: frontend/Dockerfile
Mart Lubbers's avatar
Mart Lubbers committed
21 22 23
    depends_on:
      - backend
    ports:
Camil Staps's avatar
Camil Staps committed
24
      - "80:80"
Mart Lubbers's avatar
Mart Lubbers committed
25 26 27 28 29
    volumes:
      - "./frontend/:/var/www/html/"
    restart: always

  stats:
Camil Staps's avatar
Camil Staps committed
30
    build: stats
Mart Lubbers's avatar
Mart Lubbers committed
31 32 33
    depends_on:
      - frontend
      - db
34 35 36 37
    ports:
      - "31216:31216"
    volumes:
      - "./cloogle.log:/var/log/cloogle.log"
Mart Lubbers's avatar
Mart Lubbers committed
38 39 40
    restart: always

  db:
Camil Staps's avatar
Camil Staps committed
41
    image: mariadb:latest
Mart Lubbers's avatar
Mart Lubbers committed
42 43
    volumes:
      - "./db/:/docker-entrypoint-initdb.d/"
44
      - "./db/storage/:/var/lib/mysql/"
Mart Lubbers's avatar
Mart Lubbers committed
45
    environment:
Camil Staps's avatar
Camil Staps committed
46
        MYSQL_ROOT_PASSWORD: cloogle
Mart Lubbers's avatar
Mart Lubbers committed
47 48 49
        MYSQL_DATABASE: cloogledb
        MYSQL_USER: cloogle
        MYSQL_PASSWORD: cloogle
50
    restart: always
51 52 53 54 55 56

  gc:
    build: gc
    volumes:
      - "./cache:/var/cache"
    restart: always