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 b7843e1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 30 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
8 changes: 3 additions & 5 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ services:
volumes:
- .:/var/www/html/
networks:
- workspace
- default
- traefik-public
labels:
traefik.frontend.rule: Host:test.localhost
traefik.enable: 'true'

networks:
workspace:
external:
name: workspace_default
traefik-public:
external: true

0 comments on commit b7843e1

Please sign in to comment.