add traefik

This commit is contained in:
2025-03-26 23:41:35 +01:00
parent 442379dc49
commit d02b2bb049
3 changed files with 56 additions and 2 deletions

24
.run/composeUp.run.xml Normal file
View File

@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="composeUp" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="composeUp" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>

6
README.md Normal file
View File

@@ -0,0 +1,6 @@
Event demo
==========
Admin service URL:
- http://dashboard.traefik.me/dashboard/
- http://redis.traefik.me/

View File

@@ -1,13 +1,37 @@
services:
traefik:
image: traefik:3.3.4
container_name: "traefik"
command:
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker=true"
- "--log.level=DEBUG"
ports:
- "80:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`dashboard.traefik.me`)"
- "traefik.http.services.api.loadbalancer.server.port=8080"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=api-auth"
- "traefik.http.middlewares.api-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/" # test:test
redis:
image: redis/redis-stack:7.4.0-v3
ports:
- "6379:6379"
- "8001:8001"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
volumes:
- redis_data:/data
- redisinsight_data:/redisinsight
labels:
- "traefik.http.routers.redis.rule=Host(`redis.traefik.me`)"
- "traefik.http.services.redis.loadbalancer.server.port=8001"
volumes:
redis_data:
redisinsight_data: