about summary refs log tree commit diff stats
path: root/docker-compose.yml
blob: afd7262d5278514cc78de3f50f6dbd3bdfb3b1eb (plain) (blame)
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
services:
  db:
    image: ${PROXY_REGISTRY}${DB_IMAGE}
    restart: unless-stopped
    env_file:
      - .env
    environment:
      - POSTGRES_USER=${EPUBE_DB_USER}
      - POSTGRES_PASSWORD=${EPUBE_DB_PASS}
      - POSTGRES_DB=${EPUBE_DB_NAME}
    volumes:
      - db:/var/lib/postgresql
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${EPUBE_DB_USER} -d ${EPUBE_DB_NAME}"]
      interval: 5s
      timeout: 5s
      retries: 5

  dict:
    build:
      dockerfile: .docker/dict/Dockerfile
      context: .
    restart: unless-stopped
    env_file:
      - .env

  app:
    build:
      dockerfile: .docker/app/Dockerfile
      context: .
    restart: unless-stopped
    env_file:
      - .env
    volumes:
      - ${BOOKS_DIR}:/books:ro
    depends_on:
      - db

  web-nginx:
    build:
      dockerfile: .docker/web-nginx/Dockerfile
      context: .
    security_opt:
      - apparmor=unconfined
    restart: unless-stopped
    env_file:
      - .env
    ports:
      - ${HTTP_PORT}:8080
    depends_on:
      - app

volumes:
  db: