Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
logtransfer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢宇轩
logtransfer
Commits
4ce0ad54
Commit
4ce0ad54
authored
Feb 29, 2024
by
谢宇轩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完成docker打包
parent
18284457
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
2 deletions
+39
-2
Dockerfile
Dockerfile
+5
-0
docker-compose.yml
docker-compose.yml
+14
-1
etcdctl
etcdctl
+1
-1
logtransfer-docker.conf
logtransfer-docker.conf
+19
-0
No files found.
Dockerfile
View file @
4ce0ad54
...
@@ -14,6 +14,11 @@ RUN go build -o logtransfer ./
...
@@ -14,6 +14,11 @@ RUN go build -o logtransfer ./
FROM
alpine as production
FROM
alpine as production
# 设置时区为上海
ENV
TZ=Asia/Shanghai
RUN
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
&&
echo
$TZ
>
/etc/timezone
WORKDIR
/app
WORKDIR
/app
COPY
--from=build /app /app
COPY
--from=build /app /app
...
...
docker-compose.yml
View file @
4ce0ad54
...
@@ -78,4 +78,17 @@ services:
...
@@ -78,4 +78,17 @@ services:
-
"
./resources/ccenter/config/default.yml:/app/config/default.yml"
-
"
./resources/ccenter/config/default.yml:/app/config/default.yml"
environment
:
environment
:
-
APPENV=prod
-
APPENV=prod
container_name
:
heimdallr_ccenter_api
container_name
:
heimdallr_ccenter_api
\ No newline at end of file
logtransfer
:
build
:
context
:
.
dockerfile
:
Dockerfile
depends_on
:
-
etcd0
-
etcd1
volumes
:
-
./logtransfer-docker.conf:/app/logtransfer.conf
-
./log:/app/log
container_name
:
heimdallr_logtransfer
\ No newline at end of file
etcdctl
View file @
4ce0ad54
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
set -e
set -e
set -- docker exec etcd1 /bin/sh -c "etcdctl --endpoints=http://etcd0:2379,http://etcd1:2379 $@"
set -- docker exec heimdallr_etcd0 /bin/sh -c "etcdctl --endpoints=http://heimdallr_etcd0:2379,http://heimdallr_etcd1:2379 $@"
\ No newline at end of file
\ No newline at end of file
logtransfer-docker.conf
0 → 100644
View file @
4ce0ad54
#### LogTransfer
# Kafka配置
[
kafka
]
address
=
120
.
25
.
235
.
220
:
9091
,
120
.
25
.
235
.
220
:
9092
# Kafka配置
[
etcd
]
address
=
heimdallr_etcd0
:
2379
,
heimdallr_etcd1
:
2379
# DOCKER
# ES 配置
[
es
]
address
=
http
://
47
.
107
.
239
.
240
:
9320
/
bulk_size
=
50
[
log
]
service_keyword
=
errno
,
logId
,
uri
,
refer
,
cookie
,
ua
,
host
,
clientIp
,
optime
,
request_params
,
search
,
errmsg
,
route
# 位置,级别,耗时(可以空),错误信息,错误类型,错误触发点(可以空),用户Token(可以空),设备(可以空),时间,唯一标识
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment