Skip to content

Commit

Permalink
WIP for twelve factor talk
Browse files Browse the repository at this point in the history
  • Loading branch information
4141done committed Feb 1, 2023
1 parent 658a7e7 commit 425477b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
- mm_2023

consul-server:
image: hashicorp/consul:1.14.3
image: hashicorp/consul:1.14.4
container_name: consul-server
restart: always
volumes:
Expand All @@ -29,7 +29,7 @@ services:
command: "agent"

consul-client:
image: hashicorp/consul:1.14.3
image: hashicorp/consul:1.14.4
container_name: consul-client
restart: always
volumes:
Expand Down
14 changes: 14 additions & 0 deletions load_balancer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
FROM nginx:1.23
ARG CONSUL_TEMPLATE_VERSION=0.30.0
# we define an environment variable with the location of our Consul cluster. By default, it will try to resolve to
# consul-client:8500 which would be the behavior if we have Consul running as a container in the same host and we link it to this
# Nginx container (with the alias consul, of course). But this environment variable can also be overridden when we run the
# container if we want to point somewhere else.
ENV CONSUL_URL consul-client:8500

# download the latest version of Consul Template and we put it on /usr/local/bin
ADD https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip /usr/bin/
RUN unzip /usr/bin/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip && \
mv consul-template /usr/local/bin/consul-template && \
rm -rf /usr/bin/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip


COPY nginx.conf /etc/nginx/nginx.conf

0 comments on commit 425477b

Please sign in to comment.