File tree Expand file tree Collapse file tree 3 files changed +23
-25
lines changed
Expand file tree Collapse file tree 3 files changed +23
-25
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,11 @@ RUN CGO_ENABLED=0 GOOS=linux go build -o /go/bin/ratelimit -ldflags="-w -s" -v g
1212
1313FROM alpine:3.11 AS final
1414RUN apk --no-cache add ca-certificates
15+
16+ FROM ubuntu:latest as install
17+ RUN apt-get update && apt-get install -y supervisor
18+ RUN mkdir -p /var/log/supervisor
1519COPY --from=build /go/bin/ratelimit /bin/ratelimit
20+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
21+
22+ ENTRYPOINT ["/usr/bin/supervisord" ]
Original file line number Diff line number Diff line change @@ -7,26 +7,6 @@ services:
77 - 6379
88 ports :
99 - " 6379:6379"
10- networks :
11- - data
12- volumes :
13- - redis-data:/data
14-
15- ratelimit :
16- build :
17- context : ./
18- dockerfile : Dockerfile
19- ports :
20- - 8080:8080
21- depends_on :
22- - redis
23- networks :
24- - data
25- links :
26- - redis
27- volumes :
28- - ./examples:/data/
29- - 6379:6379
3010 networks :
3111 - ratelimit-network
3212
@@ -89,8 +69,3 @@ volumes:
8969 ratelimit-data :
9070 - MEMCACHE_HOST_PORT=memcached:11211
9171
92- networks :
93- ratelimit-network :
94-
95- volumes :
96- binary :
Original file line number Diff line number Diff line change 1+ [supervisord]
2+ logfile=/var/log/supervisor/supervisord.log
3+ pidfile=/var/run/supervisord.pid
4+ nodaemon=true
5+
6+ [unix_http_server]
7+ file = /var/tmp/supervisor.sock
8+
9+ [supervisorctl]
10+ serverurl=unix:///var/tmp/supervisor.sock
11+
12+ [program:app]
13+ command=/bin/ratelimit
14+ redirect_stderr=true
15+ stdout_logfile=/dev/stdout ; Just dump to stdout, Docker should find it
16+ stdout_logfile_maxbytes = 0
You can’t perform that action at this time.
0 commit comments