Skip to content

Commit 1bdf7ff

Browse files
committed
fix: bug fix/debuging
1 parent f4dab44 commit 1bdf7ff

File tree

2 files changed

+63
-36
lines changed

2 files changed

+63
-36
lines changed

configuration.nix

+33-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# /etc/nixos/
1+
# /etc/nixos/configuration.nix
22
{ config, pkgs, ... }:
33

44
{
@@ -87,20 +87,49 @@
8787

8888
# Docker und Docker Compose aktivieren
8989
services.dockerRegistry.enable = true;
90-
virtualisation.docker.enable = true;
9190
virtualisation.docker.registries = [ "docker.io" ];
91+
virtualisation.docker.enable = true;
92+
93+
# Docker-Services konfigurieren
9294
virtualisation.docker.services = [
9395
{
9496
name = "sentry";
95-
image = "getsentry/sentry:latest"; # Ersetze dies durch die passende Version
97+
image = "getsentry/sentry:latest";
9698
ports = [ "9000:9000" ];
9799
environment = {
98100
SENTRY_SECRET_KEY = "your_secret_key";
99101
SENTRY_DATABASE_URL = "postgres://sentry_user:password@localhost/sentry_db";
100102
SENTRY_REDIS_URL = "redis://localhost:6379";
101103
};
102104
volumes = [
103-
{ hostPath = "/var/lib/sentry"; containerPath = "/data" }
105+
{
106+
hostPath = "/var/lib/sentry";
107+
containerPath = "/data";
108+
}
109+
];
110+
}
111+
{
112+
name = "clickhouse";
113+
image = "clickhouse/clickhouse-server:latest";
114+
ports = [
115+
{
116+
containerPort = 8123;
117+
hostPort = 8123;
118+
}
119+
{
120+
containerPort = 9000;
121+
hostPort = 9000;
122+
}
123+
];
124+
volumes = [
125+
{
126+
hostPath = "/var/lib/clickhouse";
127+
containerPath = "/var/lib/clickhouse";
128+
}
129+
{
130+
hostPath = "/var/log/clickhouse-server";
131+
containerPath = "/var/log/clickhouse-server";
132+
}
104133
];
105134
}
106135
];

sentry.nix

+30-32
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
{ config, pkgs, ... }:
33

44
{
5-
## DINSTE: Sentry, PostgreSQL, Redis, Kafka, Zookeeper, Clickhouse, Symbolicator, Relay
5+
## DINSTE: Sentry, PostgreSQL, Redis, apache-kafka, Zookeeper, *Clickhouse*, Symbolicator, Relay.
6+
## und nachtreglich hinzugefügt nginx
67

7-
# PostgreSQL und Redis wie vorher
8+
# PostgreSQL
89
services.postgresql = {
910
enable = true;
1011
package = pkgs.postgresql_14;
@@ -14,23 +15,25 @@
1415
'';
1516
};
1617

18+
# Redis
1719
services.redis = {
1820
enable = true;
1921
package = pkgs.redis;
20-
dataDir = "/var/lib/redis";
22+
#dataDir = "/var/lib/redis"; # dataDir entfernt, da es nicht erforderlich ist
2123
};
2224

23-
# ZooKeeper und Kafka wie vorher
25+
# ZooKeeper
2426
services.zookeeper = {
2527
enable = true;
2628
package = pkgs.zookeeper;
2729
dataDir = "/var/lib/zookeeper";
2830
clientPort = 2181;
2931
};
3032

31-
services.kafka = {
33+
# Apache Kafka
34+
services.apache-kafka = {
3235
enable = true;
33-
package = pkgs.kafka;
36+
package = pkgs.apacheKafka;
3437
settings = {
3538
"log.dirs" = "/var/lib/kafka-logs";
3639
"zookeeper.connect" = "localhost:2181";
@@ -40,16 +43,13 @@
4043
};
4144
};
4245

43-
# Clickhouse Service hinzufügen
44-
services.clickhouse = {
45-
enable = true;
46-
package = pkgs.clickhouse;
47-
settings = {
48-
"listen_host" = "::";
49-
"tcp_port" = 9000;
50-
"http_port" = 8123;
51-
};
52-
};
46+
# Clickhouse
47+
#services.clickhouse = {
48+
# enable = true;
49+
# package = pkgs.clickhouse;
50+
# httpPort = 8123;
51+
# port = 9000;
52+
#};
5353

5454
# Symbolicator
5555
services.symbolicator = {
@@ -90,34 +90,32 @@
9090
};
9191

9292
# Sentry Relay
93-
services.relay = {
94-
enable = true;
95-
package = pkgs.relay;
96-
settings = {
97-
"bind" = "0.0.0.0:3000";
98-
"upstream" = "http://localhost:9000";
99-
};
100-
};
101-
102-
# sentry upgrade
93+
#services.relay = {
94+
# enable = true;
95+
# package = pkgs.relay;
96+
# settings = {
97+
# "bind" = "0.0.0.0:3000";
98+
# "upstream" = "http://localhost:9000";
99+
# };
100+
#};
101+
102+
# Sentry-Upgrade
103103
environment.variables = {
104104
SENTRY_SECRET_KEY = "secret-key";
105105
SENTRY_DATABASE_URL = "postgres://sentry_user:password@localhost/sentry_db";
106106
SENTRY_REDIS_URL = "redis://localhost:6379";
107107
};
108108

109+
# Nginx Konfiguration
109110
services.nginx = {
110111
enable = true;
111112
virtualHosts."sentry.example.com" = {
113+
listen = [ { addr = "0.0.0.0"; port = 3000; } ];
112114
root = "/var/www/sentry";
113115
locations."/" = {
114116
proxyPass = "http://localhost:9000";
117+
proxySetHeader = "X-Relay-Host" "relay.example.com"; # Optional
115118
};
116119
};
117120
};
118-
119-
#conterner
120-
121-
122-
123-
}
121+
}

0 commit comments

Comments
 (0)