Skip to content

Commit

Permalink
Eliminate docker-compose.dev.yml
Browse files Browse the repository at this point in the history
We can tell Lagoon to ignore the `https` service with a label, so we
don't need a separate file.
  • Loading branch information
xendk committed Dec 20, 2024
1 parent 01fdcdd commit bebf0a3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 27 deletions.
3 changes: 0 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ vars:
DOCKER_COMPOSE_FILES_DEFAULT: "-f docker-compose.yml"
DOCKER_COMPOSE_FILES: "{{.DOCKER_COMPOSE_FILES | default .DOCKER_COMPOSE_FILES_DEFAULT }}"
DOCKER_COMPOSE_FILES_CI: "{{.DOCKER_COMPOSE_FILES}} -f docker-compose.ci.yml"
DOCKER_COMPOSE_FILES_DEV: "{{.DOCKER_COMPOSE_FILES}} -f docker-compose.dev.yml"

# Sql dump files directory
DIR_RESTORE_DATABASE: "restore/database"
Expand Down Expand Up @@ -178,8 +177,6 @@ tasks:
- task dev:create-users
# Show a one-time login to the local site.
- task dev:cli -- drush user-login
env:
DOCKER_COMPOSE_FILES: "{{ .DOCKER_COMPOSE_FILES_DEV }}"

dev:openid:configure:
desc: Set openid connect settings based on .env variables. And run cron.
Expand Down
24 changes: 0 additions & 24 deletions docker-compose.dev.yml

This file was deleted.

22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,35 @@ x-environment:
#LAGOON_ENVIRONMENT_TYPE: production

services:
https:
image: ghcr.io/reload/https-proxy:proxy
ports:
- '80'
- '443'
depends_on:
- varnish
labels:
lagoon.type: none
volumes:
- 'projectroot:/app'
- '${HOME}/.local/share/mkcert:/rootCA:ro'
- '${HOME}/.local/share/dev_certificates:/cert:rw'
environment:
NGINX_DOCUMENT_ROOT: /app/web
NGINX_PROXY_PASS: http://varnish:8080
VIRTUAL_PROTO: https
VIRTUAL_HOST: >-
${COMPOSE_PROJECT_NAME:-dapple-cms}.${DEV_TLD:-docker}
working_dir: /app

varnish: # Caching HTTP reverse proxy that serves (mostly) anonymous requests.
# https://docs.lagoon.sh/lagoon/docker-images/varnish
image: uselagoon/varnish-6-drupal:latest
depends_on:
- nginx
labels:
lagoon.type: varnish
dev.orbstack.domains: ${COMPOSE_PROJECT_NAME:-dapple-cms}.local
links:
- nginx # links varnish to the nginx in this docker-compose project, or it would try to connect to any nginx running in docker
<< : *default-user # uses the defined user from top
Expand Down

0 comments on commit bebf0a3

Please sign in to comment.