all repos

onasty @ 7e5389d

a one-time notes service

onasty/docker-compose.yml (view raw)

Smirnov Oleksandr Smirnov Oleksandr
ss2316544@gmail.com
chore: improve how caching while docker builds done (#111)..., 1 year ago
1
services:
2
  runtime:
3
    image: onasty:runtime
4
    build:
5
      context: .
6
      dockerfile: runtime.dockerfile
7
8
  core:
9
    image: onasty:core
10
    container_name: onasty-core
11
    build:
12
      context: .
13
      dockerfile: Dockerfile
14
    env_file: .env
15
    ports:
16
      - 8000:8000
17
      - 8001:8001
18
    depends_on:
19
      - runtime
20
      - mailer
21
      - postgres
22
      - redis
23
      - nats
24
25
  mailer:
26
    image: onasty:mailer
27
    container_name: onasty-mailer
28
    build:
29
      context: .
30
      dockerfile: ./mailer/Dockerfile
31
    env_file: ./mailer/.env
32
    depends_on:
33
      - runtime
34
      - nats
35
36
  postgres:
37
    image: postgres:16-alpine
38
    container_name: onasty-postgres
39
    environment:
40
      POSTGRES_USER: onasty
41
      POSTGRES_PASSWORD: qwerty
42
      POSTGRES_DB: onasty
43
    volumes:
44
      - .docker/postgres:/var/lib/postgresql/data
45
    ports:
46
      - 5432:5432
47
48
  nats:
49
    image: nats:2.10
50
    ports:
51
      - 4222:4222
52
53
  redis:
54
    image: redis:7.4-alpine
55
    container_name: onasty-redis
56
    ports:
57
      - 6379:6379
58
59
  prometheus:
60
    image: prom/prometheus
61
    container_name: onasty-prometheus
62
    user: root
63
    volumes:
64
      - ./.docker/prometheus:/prometheus
65
      - ./infra/prometheus:/etc/prometheus
66
    ports:
67
      - 9090:9090
68
69
  grafana:
70
    image: grafana/grafana:11.1.6
71
    container_name: onasty-grafana
72
    user: root
73
    environment:
74
      - GF_SECURITY_ADMIN_USER=admin
75
      - GF_SECURITY_ADMIN_PASSWORD=admin
76
    volumes:
77
      - ./.docker/grafana:/var/lib/grafana
78
      - ./infra/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
79
    ports:
80
      - 3069:3000
81
82
  loki:
83
    image: grafana/loki:3.2.0
84
    command: ["--pattern-ingester.enabled=true", "-config.file=/etc/loki/config.yaml"]
85
    ports:
86
      - 3100:3100
87
    volumes:
88
      - ./infra/loki/config.yaml:/etc/loki/config.yaml
89
90
  promtail:
91
    image: grafana/promtail:3.0.0
92
    command: -config.file=/etc/promtail/config.yaml
93
    volumes:
94
      - /var/run/docker.sock:/var/run/docker.sock
95
      - ./infra/promtail/config.yaml:/etc/promtail/config.yaml