Boxlang Multisite using Docker and Commandbox
docker-compose.yml
version: '3.4'
services:
bxapp:
image: ortussolutions/commandbox:jdk21
environment:
- BOX_SERVER_APP_CFENGINE=boxlang
- cfengine=boxlang
- BOXLANG_DEBUG=true
- BOXLANG_MODULES=bx-compat-cfml,bx-esapi,bx-mysql
- REWRITES=false
- BOXLANG_HOME=/var/boxlang
- BOXLANG_HEALTH_CHECK=false
- BOX_SERVER_WEB_useProxyForwardedIP=true
ports:
- 80:8080
- 443:443
volumes:
- /var/www/domains/:/var/www/
- /var/www/domains/app:/app
- /etc/letsencrypt/:/etc/letsencrypt/
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/"]
interval: 60s
timeout: 30s
retries: 5
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 0s
failure_action: continue
order: start-first
restart_policy:
condition: on-failure
delay: 5s
docker-compose.yml with nginx in front:
version: '3.4'
services:
web:
image: nginx
volumes:
- /var/www/nginx/nginx.conf:/etc/nginx/nginx.conf
- /var/www/nginx/conf.d/:/etc/nginx/conf.d/
- /var/www/nginx/boxlang.conf:/etc/nginx/boxlang.conf
- /var/www/nginx/boxlang-proxy.conf:/etc/nginx/boxlang-proxy.conf
- /var/www/domains/:/var/www/
- /etc/letsencrypt/:/etc/letsencrypt/
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
depends_on:
- bxapp
bxapp:
image: ortussolutions/commandbox:jdk21
environment:
- BOX_SERVER_APP_CFENGINE=boxlang
- cfengine=boxlang
- BOXLANG_DEBUG=true
- BOXLANG_MODULES=bx-compat-cfml,bx-esapi,bx-mysql
- REWRITES=false
- BOXLANG_HOME=/var/boxlang
- BOXLANG_HEALTH_CHECK=false
- BOX_SERVER_WEB_useProxyForwardedIP=true
ports:
- 8080:8080
volumes:
- /var/www/domains/:/var/www/
- /var/www/domains/app:/app
- /var/www/boxlang:/var/boxlang
- /etc/letsencrypt/:/etc/letsencrypt/
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/"]
interval: 60s
timeout: 30s
retries: 5
deploy:
replicas: 1
update_config:
parallelism: 1
delay: 0s
failure_action: continue
order: start-first
restart_policy:
condition: on-failure
delay: 5s

