Skip to content

Commit

Permalink
LPD-15548: Upgrade workspace container dependencies
Browse files Browse the repository at this point in the history
We were using an older version of Traefik which was not working anymore for some colleagues. Upgrading Traefik also caused some configuration changes to make everything work.
  • Loading branch information
josephineb committed Jan 26, 2024
1 parent 5a0e7b2 commit 247675c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
46 changes: 21 additions & 25 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,38 @@ version: '3'

services:
reverse-proxy:
image: traefik:v1.7.0
command: --api --docker --docker.endpoint=tcp://docker-socket-proxy:2375 --docker.exposedByDefault=false --docker.network=workspace_default
image: traefik:latest
command:
- "--log.level=DEBUG"
- "--log.filePath=/var/log/traefik/traefik.log"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.network=traefik-public"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.endpoint=unix:///var/run/docker.sock"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.mysql.address=:3306"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/log/traefik:/var/log/traefik
ports:
- 80:80
- 3306:3306
- 8080:8080
restart: always
networks:
- default
- traefik-docker

# Improve security by not giving Traefik direct access to the docker socket
# See https://docs.traefik.io/v1.7/configuration/backends/docker/#security-considerations
# and https://github.com/containous/traefik/issues/4174#issuecomment-446564816
docker-socket-proxy:
image: tecnativa/docker-socket-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
CONTAINERS: 1
NETWORKS: 1
SERVICES: 1
TASKS: 1
restart: always
networks:
- traefik-docker
- traefik-public

rabbitmq:
build: docker/rabbitmq
ports:
- 15672:15672
- 5672:5672
restart: always
networks:
- traefik-public

networks:
# The traefik-docker network is intended to be used by Traefik to access the docker-socket-proxy service, and
# shouldn't be used by other services.
traefik-docker:
driver_opts:
encrypted: 'true'
traefik-public:
name: traefik-public
2 changes: 1 addition & 1 deletion tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ services:
networks:
workspace:
external:
name: workspace_default
name: traefik-public

0 comments on commit 247675c

Please sign in to comment.