-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (41 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Load-balancer
FROM alpine:3.4
# ---------------------------------------------------------
# Installation
# ---------------------------------------------------------
# Install haproxy
RUN apk add -U haproxy curl
# ---------------------------------------------------------
# Configuration
# ---------------------------------------------------------
# Configure haproxy
RUN mkdir -p /data/logs
RUN mkdir -p /data/config
RUN mkdir -p /data/config
RUN mkdir -p /var/lib/haproxy/dev
# Add files
ADD ./errors/ /app/errors/
ADD ./public_html/ /app/public_html/
# Create error responses
RUN cat /app/errors/400.hdr /app/public_html/400.html > /app/errors/400.http
RUN cat /app/errors/403.hdr /app/public_html/403.html > /app/errors/403.http
RUN cat /app/errors/404.hdr /app/public_html/404.html > /app/errors/404.http
RUN cat /app/errors/408.hdr /app/public_html/408.html > /app/errors/408.http
RUN cat /app/errors/500.hdr /app/public_html/500.html > /app/errors/500.http
RUN cat /app/errors/502.hdr /app/public_html/50x.html > /app/errors/502.http
RUN cat /app/errors/503.hdr /app/public_html/50x.html > /app/errors/503.http
RUN cat /app/errors/504.hdr /app/public_html/50x.html > /app/errors/504.http
# Added start process
ADD ./robin /app/
# Configure volumns
VOLUME ["/data", "/dev/log"]
# Export ports
# 80: Public HTTP
# 81: Private HTTP
# 82: Private TCP+SSL
# 443: Public HTTPS
# 7088: Stats HTTPS
# 8055: Metrics
EXPOSE 80 81 82 443 7088 8055 8056
# Start the load-balancer
ENTRYPOINT ["/app/robin"]