This repository has been archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
121 lines (111 loc) · 3.14 KB
/
docker-compose.yaml
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: '3.8'
x-fishjam-template: &fishjam-template
image: "ghcr.io/fishjam-dev/fishjam:${FISHJAM_VERSION:-edge}"
restart: unless-stopped
environment: &fishjam-environment
JF_SERVER_API_TOKEN: ${JF_SERVER_API_TOKEN:-development}
JF_CHECK_ORIGIN: "${JF_CHECK_ORIGIN:-false}"
JF_DIST_ENABLED: "${JF_DIST_ENABLED:-true}"
JF_DIST_NODES: "app@fishjam1 app@fishjam2"
JF_WEBRTC_TURN_IP: $EXTERNAL_IP
JF_WEBRTC_TURN_LISTEN_IP: "0.0.0.0"
services:
fishjam1:
<<: *fishjam-template
container_name: fishjam1
environment:
<<: *fishjam-environment
JF_HOST: "localhost:5002}"
JF_PORT: 5002
JF_DIST_NODE_NAME: app@fishjam1
JF_WEBRTC_TURN_PORT_RANGE: "50000-50100"
JF_WEBRTC_TURN_TCP_PORT: "49999"
ports:
- "5002:5002"
- "49999:49999"
- "50000-50100:50000-50100/udp"
fishjam2:
<<: *fishjam-template
restart: unless-stopped
container_name: fishjam2
environment:
<<: *fishjam-environment
JF_HOST: "localhost:5003}"
JF_PORT: 5003
JF_DIST_NODE_NAME: app@fishjam2
JF_WEBRTC_TURN_PORT_RANGE: "50101-50200"
JF_WEBRTC_TURN_TCP_PORT: "49998"
ports:
- "5003:5003"
- "49998:49998"
- "50101-50200:50101-50200/udp"
frontend:
build:
context: ./assets
dockerfile: ./Dockerfile
args:
FE_BE_HOST: ${BE_HOST:-$DOMAIN:5004}
FISHJAM_VERSION: ${FISHJAM_VERSION:-0.3.0}
FISHJAM_ROOM_VERSION: ${FISHJAM_ROOM_VERSION:-build}
ALLOY_API_KEY: ${ALLOY_API_KEY}
container_name: frontend
restart: unless-stopped
depends_on:
- backend
- fishjam1
- fishjam2
ports:
- "127.0.0.1:5005:5005"
backend:
build:
context: .
dockerfile: ./Dockerfile
container_name: backend
environment:
BE_PORT: 5004
BE_HOST: ${BE_HOST:-$DOMAIN}
BE_PHX_SERVER: "true"
BE_JF_ADDRESS: ${BE_JF_ADDRESS:-fishjam1:5002}
BE_JF_SECURE_CONNECTION: ${BE_JF_SECURE_CONNECTION:-false}
BE_JF_SERVER_API_TOKEN: ${JF_SERVER_API_TOKEN:-development}
restart: unless-stopped
depends_on:
- fishjam1
- fishjam2
ports:
- "127.0.0.1:5004:5004"
grafana:
build:
context: ./infra/grafana/
dockerfile: Dockerfile
container_name: grafana
ports:
- "127.0.0.1:3000:3000"
environment:
GF_SECURITY_ADMIN_PASSWORD: "${GF_SECURITY_ADMIN_PASSWORD}"
GF_SECURITY_ADMIN_USER: "${GF_SECURITY_ADMIN_USER}"
loki:
build:
context: ./infra/loki/
dockerfile: Dockerfile
container_name: loki
command: -config.file=/etc/loki/local-config.yaml
volumes:
- loki-data:/loki
grafana-alloy:
build:
context: ./infra/alloy/
dockerfile: Dockerfile
container_name: alloy
environment:
- ALLOY_API_KEY=${ALLOY_API_KEY}
- AGENT_PORT_APP_RECEIVER=${AGENT_PORT_APP_RECEIVER:-8027}
entrypoint:
- '/bin/alloy'
- 'run'
- '--server.http.listen-addr=127.0.0.1:12345'
- '--config.extra-args="-config.expand-env"'
- '${ALLOY_CONFIG_PATH:-/etc/alloy}/${ALLOY_CONFIG_FILE:-config.alloy}'
volumes:
grafana-storage:
loki-data: