Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit 45438fe

Browse files
committed
Update docker compose deploy
1 parent e95232e commit 45438fe

File tree

7 files changed

+80
-3
lines changed

7 files changed

+80
-3
lines changed

.env.example

+16
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,19 @@ DOMAIN=localhost
1313

1414
GF_SECURITY_ADMIN_USER=ADMIN
1515
GF_SECURITY_ADMIN_PASSWORD=PASSWORD
16+
17+
ALLOY_CONFIG_FILE=config.alloy
18+
ALLOY_CONFIG_PATH=/etc/alloy
19+
ALLOY_CONFIG_PATH_LOCAL=./infra/alloy/config
20+
21+
AGENT_KEY_APP_RECEIVER=api_key
22+
AGENT_HOST=alloy
23+
AGENT_LOGS_PATH=/var/log
24+
AGENT_PORT=12345
25+
AGENT_PORT_APP_RECEIVER=8027
26+
AGENT_TEMP_PATH=/tmp/agent
27+
AGENT_WAL_PATH=wal
28+
29+
30+
DEMO_CLIENT_PACKAGE_NAME="app"
31+
DEMO_PACKAGE_NAME="app"

.github/workflows/sandbox_build_and_deploy.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
id: variables_population
3131
run: |
3232
echo "DOMAIN=${{env.DOMAIN}}
33+
ALLOY_CONFIG_FILE=config.alloy
34+
ALLOY_CONFIG_PATH=/etc/alloy
35+
ALLOY_CONFIG_PATH_LOCAL=./infra/alloy/config
3336
FISHJAM_ROOM_VERSION=${{ steps.versions.outputs.fishjam_room }}
3437
FISHJAM_VERSION=${{ steps.versions.outputs.fishjam }}
3538
JF_SERVER_API_TOKEN=${{secrets.SERVER_API_TOKEN_CLOUD_SANDBOX}}
@@ -44,6 +47,8 @@ jobs:
4447
privateKey: ${{ secrets.SSH_PRIV_KEY }}
4548
command: |
4649
docker ps -aq | xargs -r docker stop | xargs -r docker rm
50+
51+
4752

4853
- name: Deploy docker compose to a pre-configured server on first host
4954
uses: TapTap21/docker-remote-deployment-action@v1.1
@@ -52,4 +57,4 @@ jobs:
5257
ssh_private_key: ${{ secrets.SSH_PRIV_KEY }}
5358
ssh_public_key: ${{ secrets.SSH_PUB_KEY }}
5459
stack_file_name: ${{ env.COMPOSE_FILE_NAME }}
55-
args: -p ${{ env.PROJECT }} --env-file .env up -d --remove-orphans --build frontend backend
60+
args: -p ${{ env.PROJECT }} --env-file .env up -d --remove-orphans --build

docker-compose-deploy.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,45 @@ services:
3232
ports:
3333
- "5004:5004"
3434

35+
grafana:
36+
build:
37+
context: ./infra/grafana/
38+
dockerfile: Dockerfile
39+
container_name: grafana
40+
ports:
41+
- "3000:3000"
42+
environment:
43+
- GF_AUTH_ANONYMOUS_ENABLED=true
44+
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
45+
volumes:
46+
- grafana-storage:/var/lib/grafana
47+
48+
loki:
49+
build:
50+
context: ./infra/loki/
51+
dockerfile: Dockerfile
52+
container_name: loki
53+
ports:
54+
- "3100:3100"
55+
command: -config.file=/etc/loki/local-config.yaml
56+
volumes:
57+
- loki-data:/loki
58+
59+
grafana-alloy:
60+
build:
61+
context: ./infra/alloy/
62+
dockerfile: Dockerfile
63+
env_file:
64+
- './.env.example'
65+
entrypoint:
66+
- '/bin/alloy'
67+
- 'run'
68+
- '--server.http.listen-addr=0.0.0.0:12345'
69+
- '--config.extra-args="-config.expand-env"'
70+
- '${ALLOY_CONFIG_PATH}/${ALLOY_CONFIG_FILE}'
71+
environment:
72+
AGENT_PORT_APP_RECEIVER: 8027
73+
74+
volumes:
75+
grafana-storage:
76+
loki-data:

infra/alloy/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM grafana/alloy:latest
2+
COPY ./config.alloy /etc/alloy/config.alloy

infra/grafana/Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM grafana/grafana:latest
2+
COPY ./provisioning /etc/grafana/provisioning

infra/loki/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM grafana/loki:latest
2+
3+
COPY ./loki-config.yaml /etc/loki/local-config.yaml

infra/loki/loki-config.yaml

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,20 @@ ingester:
1919
schema_config:
2020
configs:
2121
- from: 2020-05-15
22-
store: boltdb
22+
store: tsdb # Changed from boltdb to tsdb
2323
object_store: filesystem
24-
schema: v11
24+
schema: v13 # Updated from v11 to v13
2525
index:
2626
prefix: index_
2727
period: 168h
2828

29+
storage_config:
30+
tsdb: # Changed from boltdb to tsdb
31+
dir: /tmp/loki/index
32+
33+
filesystem:
34+
directory: /tmp/loki/chunks
35+
2936
storage_config:
3037
boltdb:
3138
directory: /tmp/loki/index

0 commit comments

Comments
 (0)