docker-compose


customize lucee5 docker image to allow running of multiple website within the image


I am running the lucee5 image with docker-compose and that works well. I was able to link my local volume into the dockerimages.
the local project contains 4 websites which should all run within the docker image.
I would like to be able to connect to them like localhost:1337/customer and localhost:1337/player and localhost:1337/etc..
So for this I have to setup Apache on the docker image which I know how to do. However, when I quit stop docker-compose and try to persist the last container with the new changes, I run into a error message when I want to run that new container using compose (exit code 0).
My end goals is to be able to start up docker-compose so that I have my 3 websites available for testing and I can work on the project locally in my IDE whilst docker is running that same source.
I know I could put my MYSQL database also outside of the docker-image and reference it.
How do I tackle that error exit 0 when changing my image?
My Docker Compose file
version: '2'
services:
web:
image: lucee/lucee5
ports:
- "1337:8888"
volumes:
- /Users/matti/www/projectx/:/var/www/
projectx has 3 subfolders which have 3 cfml roots that run the index.cfm:
projectx/customer/root -> index.cfm
projectx/play/root -> index.cfm
projectx/tracker/root -> index.cfm
I would make 3 apache websites in apache on the lucee5 image.
The easiest method to run 3 apps using the Lucee docker image would be to define a service for each in your docker compose file, e.g.
version: '2'
services:
customer-app:
image: lucee/lucee5
ports:
- "8001:8888"
volumes:
- /your/path/to/projectx/customer/root:/var/www
# the line below is an example of how to customise the lucee-web.xml.cfm for this app
- /your/path/to/projectx/customer/lucee/lucee-web.xml.cfm:/opt/lucee/web/lucee-web.xml.cfm
play-app:
image: lucee/lucee5
ports:
- "8002:8888"
volumes:
- /your/path/to/projectx/play/root:/var/www
tracker-app:
image: lucee/lucee5
ports:
- "8003:8888"
volumes:
- /your/path/to/projectx/tracker/root:/var/www
If you need to access each app via a single hostname but different URL paths (i.e. mydomain.local/customer, mydomain.local/play, mydomain.local/tracker), then you could add a single Apache container which acts as a reverse proxy to each of the 3 Lucee containers.
The additional service for your docker compose file will look something like this;
apache:
image: httpd
ports:
- "80:80"
volumes:
- /your/path/to/projectx/apache/httpd.conf:/usr/local/apache2/conf/httpd.conf
Your Apache configuration can go into a httpd.conf which is added to the service via a volume.

Related Links

version control of docker-compose.yml
Limit resources in docker-compose v3
Docker compose: using relative service address in environment
Azure Container Service: Update Docker-Compose?
Docker compose: doesnt allow to use constraints if you have a env variable set
How to use visual studio docker function on Windows Home edition?
Passing arguments to docker compose file when using it for swarm
How to run ad hoc docker compose commands in Ansible?
Using custom hostnames for docker local development containers
Changing the network name?
Let external container know about subnets created by multiple docker-compose projects
How to monitor / discover more docker containers with prometheus
two docker-compose .yml in the same network with COMPOSE_PROJECT_NAME
docker compose 3.1(swarm), secrets, ssl and nginx
What is the version directive for?
How to run docker-compose up -d at system start up?

Categories

HOME
excel-formula
redux
system-calls
pelican
mifare
spotfire
redhawksdr
squeak
jquery-select2
pip
aspectj
repeater
console-application
greensock
vivado-hls
cucumberjs
novacode-docx
summernote
dev-c++
onclicklistener
uipath
android-6.0-marshmallow
launchd
blockly
availability
azure-vm-scale-set
ragel
extern
stochastic-process
server-side-swift
fisheye
file-descriptor
mtm
irr
php-mongodb
amazon-rds-aurora
noise
serialversionuid
extjs3
jenkins-docker
petapoco
spring-social-twitter
consolidation
indoor-positioning-system
dimensionality-reduction
visual-web-developer
boost-range
jcalendar
containstable
videoview
opendolphin
om
targetprocess
fileinputstream
httpmodule
strcpy
xmla
backtrace
optimistic-locking
qxorm
alpha-beta-pruning
cordova-3
dojox.grid
drools-guvnor
fedena
register-allocation
zoneminder
pytz
time-frequency
episerver-7
azure-caching
nomachine
codio
mdp
complete
dylan
tlbimp
kademlia
infinity.js
urlfetch
parsec
ruby-1.9
apache-commons-email
vectorwise
windows-xp-embedded
sipdroid
functional-specifications
viewdata
subdirectories
for-xml
file-storage
retrospectiva
hotfix

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App