Docker-Swarm-Loadbalancer/docker-compose.yml

78 lines
1.9 KiB
YAML
Raw Permalink Normal View History

2024-05-18 23:53:03 +00:00
networks:
default:
services:
2024-06-21 11:53:36 +00:00
loadbalancer:
2022-05-05 14:42:53 +00:00
build:
2024-05-18 23:53:03 +00:00
context: .
2024-06-21 11:53:36 +00:00
target: loadbalancer
args:
MAINTAINER: "Test <test@oneupsales.co.uk>"
SOURCE_URL: "https://github.com/doesntmatter"
GIT_SHA: "1234"
GIT_BUILD_ID: "test"
GIT_COMMIT_MESSAGE: "testy mctestface"
BUILD_DATE: "1970-01-01"
additional_contexts:
- php:cli=docker-image://ghcr.io/benzine-framework/php:cli-8.2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2024-06-21 14:21:10 +00:00
image: loadbalancer-test
2024-05-18 23:53:03 +00:00
networks:
default:
aliases:
- a.example.org
- b.example.org
- plural.example.org
- redirect-to-ssl.example.org
- nope.example.org
depends_on:
web-a:
condition: service_healthy
web-b:
condition: service_healthy
web-redirect-ssl:
condition: service_healthy
web-plural:
condition: service_healthy
web-a: &web
2022-05-05 14:42:53 +00:00
build:
2024-05-18 23:53:03 +00:00
context: .
target: test-app
additional_contexts:
- php:nginx=docker-image://ghcr.io/benzine-framework/php:nginx-8.2
environment:
2024-05-18 23:53:03 +00:00
- BOUNCER_DOMAIN=a.example.org
Trunk linter (#17) * linting is fun * mis-detection of missing healthcheck staements. * typo * disable tagging vanity tags on non-main branch * Unbugger node build? * Add gitleaks detector, remove an expired secret. * More linting-derived cleanup * Fiddle with trivy * Fiddle with trivy * add a readme * Fix build bug with php flavours * Marshall should build other flavours of ubuntu. * Fiddle with act cache location. * Add concurrency checks * Composer version gubbins for 7.0/7.1 * ubuntu is just a label, and injected over the top of. * Composer version gubbins for 7.0/7.1 * Run when workflow is altered too please. * Hopefully fix composer stage. * setup tooling meta-tooling. * Add trunk * Disable mirror mode, its being problematic, and increase retries to 5. * Revisit how ghcr login works. * Add trunk checks. * All hail the linter * Heavilly revise workflow * Fettling * Fettling * Fettling * Fettling * Fettling * Cleanup * Cleanup * Fettling.. Why does mitm build but not redis? * Fettling.. Why does mitm build but not redis? * Debuggin * Fettling. * Fix build? * Permissions are a pain * Switch around some should_push logic because envs aren't available that early. * Permissionssssss * Trivy, bane of my life * Fix merge? * Fix labels * Help node along, among other things * Redis 6.1 & 7.1 aren't a thing any more. * Ffff USER nonsense * latest-openssl doesn't exist. * fixup mysqlproxy. * Fix labels * uurrgh * uurrgh * Didn't need to add the mitmproxy user, it exists * Missing ghcr login * Missing backtick * Fix build? * Add validate build step to bouncer. * Fix bouncer build * Disable laravel build * Missing env * Fix swarm mon build * Scout just doesn't seem to work.
2024-02-07 15:21:14 +00:00
- BOUNCER_TARGET_PORT=80
- SITE_NAME=A
2024-05-18 23:53:03 +00:00
networks:
- default
2022-05-05 14:42:53 +00:00
web-b:
2024-05-18 23:53:03 +00:00
<<: *web
2022-05-05 14:42:53 +00:00
environment:
2024-05-18 23:53:03 +00:00
- BOUNCER_DOMAIN=b.example.org
Trunk linter (#17) * linting is fun * mis-detection of missing healthcheck staements. * typo * disable tagging vanity tags on non-main branch * Unbugger node build? * Add gitleaks detector, remove an expired secret. * More linting-derived cleanup * Fiddle with trivy * Fiddle with trivy * add a readme * Fix build bug with php flavours * Marshall should build other flavours of ubuntu. * Fiddle with act cache location. * Add concurrency checks * Composer version gubbins for 7.0/7.1 * ubuntu is just a label, and injected over the top of. * Composer version gubbins for 7.0/7.1 * Run when workflow is altered too please. * Hopefully fix composer stage. * setup tooling meta-tooling. * Add trunk * Disable mirror mode, its being problematic, and increase retries to 5. * Revisit how ghcr login works. * Add trunk checks. * All hail the linter * Heavilly revise workflow * Fettling * Fettling * Fettling * Fettling * Fettling * Cleanup * Cleanup * Fettling.. Why does mitm build but not redis? * Fettling.. Why does mitm build but not redis? * Debuggin * Fettling. * Fix build? * Permissions are a pain * Switch around some should_push logic because envs aren't available that early. * Permissionssssss * Trivy, bane of my life * Fix merge? * Fix labels * Help node along, among other things * Redis 6.1 & 7.1 aren't a thing any more. * Ffff USER nonsense * latest-openssl doesn't exist. * fixup mysqlproxy. * Fix labels * uurrgh * uurrgh * Didn't need to add the mitmproxy user, it exists * Missing ghcr login * Missing backtick * Fix build? * Add validate build step to bouncer. * Fix bouncer build * Disable laravel build * Missing env * Fix swarm mon build * Scout just doesn't seem to work.
2024-02-07 15:21:14 +00:00
- BOUNCER_TARGET_PORT=80
- SITE_NAME=B
2024-05-18 23:53:03 +00:00
web-plural:
<<: *web
environment:
- BOUNCER_DOMAIN=plural.example.org
- BOUNCER_TARGET_PORT=80
- SITE_NAME=plural
deploy:
replicas: 3
web-redirect-ssl:
<<: *web
environment:
- BOUNCER_DOMAIN=redirect-to-ssl.example.org
- BOUNCER_TARGET_PORT=80
- SITE_NAME=redirect-to-ssl
- BOUNCER_ALLOW_NON_SSL=false
test-box:
build:
context: .
target: test-box
command: ["tail", "-f", "/dev/null"]
networks:
- default