-
Notifications
You must be signed in to change notification settings - Fork 40
/
Dockerfile
49 lines (32 loc) · 1.19 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
# Base image is the Official HAProxy
FROM haproxy:2.2
# TODO: [GEN] Replace with your name and email
LABEL Daniel Palumbo <daniel.palumbo@heig-vd.ch>
# Install some tools
# TODO: [HB] Update to install required tool to install NodeJS
RUN apt-get update && apt-get -y install wget curl vim iputils-ping rsyslog
# TODO: [S6] Install
# TODO: [Serf] Install
# TODO: [HB] Install NodeJS
# TODO: [HB] Install Handlebars
# TODO: [S6] Replace the two following instructions
# Copy all the scripts and make them executable
COPY scripts/ /scripts/
RUN chmod +x /scripts/*.sh
# TODO: [Serf] Add Serf S6 setup
# TODO: [Serf] Copy events handler scripts
# Copy the haproxy and syslog config
COPY config/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
COPY config/rsyslogd.cfg /etc/rsyslog.d/49-haproxy.conf
# TODO: [HB] Copy the haproxy configuration template
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# TODO: [CFG] Create the nodes folder
# TODO: [Serf] Expose ports
# Expose the HA proxy ports
EXPOSE 80 1936
# Define an environment variable
ENV ROLE balancer
# TODO: [S6] Replace the following instruction
# Command executed when the container starts
CMD [ "/scripts/run.sh" ]