aboutsummaryrefslogtreecommitdiffhomepage
path: root/compose.prod.yaml
blob: 07ff19e91fc8dcb361481aeccc739f8a9faff37b (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
  reverse-proxy:
    image: nginx:1.27
    ports:
      - '127.0.0.1:8002:80'
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - api-server
      - app-server
    restart: always

  api-server:
    build:
      context: ./backend
    expose:
      - 80
    depends_on:
      db:
        condition: service_healthy
      task-db:
        condition: service_healthy
    environment:
      ALBATROSS_DB_HOST: db
      ALBATROSS_DB_PORT: 5432
      ALBATROSS_DB_USER: postgres
      ALBATROSS_DB_PASSWORD: eepei5reesoo0ov2ceelahd4Emi0au8ahJa6oochohheiquahweihoovahsee1oo
      ALBATROSS_DB_NAME: albatross
    env_file: [.env]
    restart: always

  app-server:
    build:
      context: ./frontend
      args:
        ALBATROSS_HOST: localhost
    expose:
      - 80
    env_file: [.env]
    restart: always

  db:
    image: postgres:16.3
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: eepei5reesoo0ov2ceelahd4Emi0au8ahJa6oochohheiquahweihoovahsee1oo
      POSTGRES_DB: albatross
    expose:
      - 5432
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5
    volumes:
      - db-data:/var/lib/postgresql/data
    restart: always

  task-db:
    image: redis:7.4.0
    expose:
      - 6379
    healthcheck:
      test: ["CMD-SHELL", "redis-cli ping"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: always

  worker:
    build:
      context: ./worker
    expose:
      - 80
    env_file: [.env]
    restart: always

volumes:
  db-data: