all repos

onasty @ 450a6a9

a one-time notes service

onasty/docker-compose.yml (view raw)

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