mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-26 23:11:10 +00:00
chore: jsonのログを見れるように
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
POSTGRES_USER: "postgres"
|
||||
POSTGRES_PASSWORD: "password"
|
||||
POSTGRES_DB: "hideout"
|
||||
|
||||
mongodb:
|
||||
image: mongo:7.0.14
|
||||
ports:
|
||||
- "27017:27017"
|
||||
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.24
|
||||
container_name: elasticsearch
|
||||
environment:
|
||||
- discovery.type=single-node
|
||||
- cluster.name=docker-cluster
|
||||
- bootstrap.memory_lock=true
|
||||
- xpack.security.enabled=true
|
||||
- xpack.monitoring.collection.enabled=true
|
||||
- ELASTIC_PASSWORD=Passw0rd
|
||||
- "ES_JAVA_OPTS=-Xms512M -Xmx512M"
|
||||
ports:
|
||||
- "9200:9200"
|
||||
volumes:
|
||||
- elasticsearch-data:/usr/share/elasticsearch/data
|
||||
restart: always
|
||||
kibana:
|
||||
image: docker.elastic.co/kibana/kibana:7.17.24
|
||||
container_name: kibana
|
||||
ports:
|
||||
- "5601:5601"
|
||||
environment:
|
||||
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
||||
- ELASTICSEARCH_USERNAME=elastic
|
||||
- ELASTICSEARCH_PASSWORD=Passw0rd
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
restart: always
|
||||
|
||||
fluentd:
|
||||
build: ./fluentd
|
||||
volumes:
|
||||
- ./fluentd/conf:/fluentd/etc
|
||||
- ../logs:/in
|
||||
depends_on:
|
||||
- "elasticsearch"
|
||||
ports:
|
||||
- "24224:24224"
|
||||
- "24224:24224/udp"
|
||||
|
||||
volumes:
|
||||
elasticsearch-data:
|
||||
driver: local
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM fluent/fluentd:v1.16-debian-2
|
||||
USER root
|
||||
RUN fluent-gem install fluent-plugin-elasticsearch --no-document
|
||||
USER fluent
|
||||
@@ -0,0 +1,19 @@
|
||||
<source>
|
||||
@type tail
|
||||
path /in/logFile.log.json
|
||||
pos_file /in/logFile.pos
|
||||
tag hideout
|
||||
<parse>
|
||||
@type json
|
||||
</parse>
|
||||
</source>
|
||||
|
||||
<match hideout>
|
||||
@type elasticsearch
|
||||
host elasticsearch
|
||||
port 9200
|
||||
index_name logs
|
||||
include_timestamp true
|
||||
user elastic
|
||||
password Passw0rd
|
||||
</match>
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"dev": {
|
||||
"name": "value",
|
||||
"Security": {
|
||||
"Auth": {
|
||||
"auth-id": {
|
||||
"Type": "OAuth2",
|
||||
"Grant Type": "Authorization Code",
|
||||
"Client ID": "{{client_id}}",
|
||||
"Client Secret": "{{client_secret}}",
|
||||
"Redirect URL": "https://example.com",
|
||||
"Token URL": "http://{{host}}/oauth/token",
|
||||
"Auth URL": "http://{{host}}/oauth/authorize",
|
||||
"Scope": "write read"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
POST http://{{host}}/api/v1/apps
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"client_name": "test-client",
|
||||
"redirect_uris": "https://example.com",
|
||||
"scopes": "write read"
|
||||
}
|
||||
|
||||
###
|
||||
|
||||
GET http://{{host}}/api/v1/accounts/verify_credentials
|
||||
Authorization: Bearer {{$auth.token("auth-id")}}
|
||||
Reference in New Issue
Block a user