summaryrefslogtreecommitdiff
path: root/packages/backend/test-federation/compose.tpl.yml
blob: 3d2ed213376326b0cadcb550ddeb1747681205d5 (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
services:
  nginx:
    image: nginx:1.27
    volumes:
      - type: bind
        source: ./certificates/rootCA.crt
        target: /etc/nginx/certificates/rootCA.crt
        read_only: true
    healthcheck:
      test: service nginx status
      interval: 5s
      retries: 20

  misskey:
    image: node:${NODE_VERSION}
    env_file:
      - ./.config/docker.env
    environment:
      - NODE_ENV=production
    volumes:
      - type: bind
        source: ../../../built
        target: /misskey/built
        read_only: true
      - type: bind
        source: ../assets
        target: /misskey/packages/backend/assets
        read_only: true
      - type: bind
        source: ../built
        target: /misskey/packages/backend/built
        read_only: true
      - type: bind
        source: ../migration
        target: /misskey/packages/backend/migration
        read_only: true
      - type: bind
        source: ../ormconfig.js
        target: /misskey/packages/backend/ormconfig.js
        read_only: true
      - type: bind
        source: ../package.json
        target: /misskey/packages/backend/package.json
        read_only: true
      - type: bind
        source: ../../misskey-js/built
        target: /misskey/packages/misskey-js/built
        read_only: true
      - type: bind
        source: ../../misskey-js/package.json
        target: /misskey/packages/misskey-js/package.json
        read_only: true
      - type: bind
        source: ../../misskey-reversi/built
        target: /misskey/packages/misskey-reversi/built
        read_only: true
      - type: bind
        source: ../../misskey-reversi/package.json
        target: /misskey/packages/misskey-reversi/package.json
        read_only: true
      - type: bind
        source: ../../../healthcheck.sh
        target: /misskey/healthcheck.sh
        read_only: true
      - type: bind
        source: ../../../package.json
        target: /misskey/package.json
        read_only: true
      - type: bind
        source: ../../../pnpm-lock.yaml
        target: /misskey/pnpm-lock.yaml
        read_only: true
      - type: bind
        source: ../../../pnpm-workspace.yaml
        target: /misskey/pnpm-workspace.yaml
        read_only: true
      - type: bind
        source: ../../../patches
        target: /misskey/patches
        read_only: true
      - type: bind
        source: ./certificates/rootCA.crt
        target: /usr/local/share/ca-certificates/rootCA.crt
        read_only: true
    working_dir: /misskey
    command: >
      bash -c "
        npm install -g pnpm
        pnpm -F backend migrate
        pnpm -F backend start
      "
    healthcheck:
      test: bash /misskey/healthcheck.sh
      interval: 5s
      retries: 20

  db:
    image: postgres:15-alpine
    env_file:
      - ./.config/docker.env
    volumes:
    healthcheck:
      test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
      interval: 5s
      retries: 20