ing
This commit is contained in:
parent
8548e829ae
commit
d9f54c3ad4
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
FROM alpine:3.7
|
||||||
|
|
||||||
|
# grab su-exec for easy step-down from root
|
||||||
|
RUN apk add --no-cache curl
|
||||||
|
|
||||||
|
COPY _docker/config/* /etc/overflow/config/
|
||||||
|
COPY _docker/bin/* /usr/local/overflow/bin/
|
||||||
|
COPY dist/probe_gateway_rpc /usr/local/overflow/bin/
|
||||||
|
|
||||||
|
RUN mkdir -p /etc/overflow/config; \
|
||||||
|
mkdir -p /usr/local/overflow/bin; \
|
||||||
|
mkdir -p /var/overflow/logs; \
|
||||||
|
chmod +x /usr/local/overflow/bin/docker-entrypoint.sh /usr/local/overflow/bin/probe_gateway_rpc;
|
||||||
|
|
||||||
|
ENV TINI_VERSION='0.17.0'
|
||||||
|
|
||||||
|
# Use tini as subreaper in Docker container to adopt zombie processes
|
||||||
|
RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-amd64 -o /bin/tini && chmod +x /bin/tini
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/tini", "--"]
|
||||||
|
CMD ["/usr/local/overflow/bin/docker-entrypoint.sh"]
|
4
_docker/bin/docker-entrypoint.sh
Normal file
4
_docker/bin/docker-entrypoint.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
exec /usr/local/overflow/bin/probe_gateway_rpc -config-dir=/etc/overflow/config
|
29
_docker/config/config.json
Normal file
29
_docker/config/config.json
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"serverHandler": {
|
||||||
|
"name": "Gateway Probe",
|
||||||
|
"network": "tcp4",
|
||||||
|
"address": ":80",
|
||||||
|
"concurrency": 262144,
|
||||||
|
"keepAlive": 60,
|
||||||
|
"handshakeTimeout": 60,
|
||||||
|
"maxMessageSize": 8192,
|
||||||
|
"readBufferSize": 4096,
|
||||||
|
"writeBufferSize": 4096,
|
||||||
|
"readTimeout": 0,
|
||||||
|
"writeTimeout": 0,
|
||||||
|
"pongTimeout": 60,
|
||||||
|
"pingTimeout": 10,
|
||||||
|
"pingPeriod": 9,
|
||||||
|
"enableCompression": false
|
||||||
|
},
|
||||||
|
"external": {
|
||||||
|
"grpc": {
|
||||||
|
"network": "tcp4",
|
||||||
|
"address": "192.168.1.50:50006"
|
||||||
|
},
|
||||||
|
"redis": {
|
||||||
|
"network": "tcp4",
|
||||||
|
"address": "192.168.1.50:6379"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
build.sh
Executable file
8
build.sh
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm ./dist
|
||||||
|
CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-s" -o ./dist/probe_gateway_rpc
|
||||||
|
|
||||||
|
docker build -t docker.loafle.net/overflow/probe_gateway_rpc:1.0.0 .
|
||||||
|
|
||||||
|
docker push docker.loafle.net/overflow/probe_gateway_rpc:1.0.0
|
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
probe_gateway_rpc:
|
||||||
|
image: docker.loafle.net/overflow/probe_gateway_rpc:1.0.0
|
||||||
|
container_name: probe_gateway_rpc
|
||||||
|
# volumes:
|
||||||
|
# - /service/redis/data/var/redis:/data
|
||||||
|
# - /service/redis/data/usr/local/etc/redis/redis.conf:/usr/local/etc/redis/redis.conf
|
||||||
|
ports:
|
||||||
|
- "19091:80"
|
Loading…
Reference in New Issue
Block a user