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

What is the difference between docker-machine and docker-compose?
Docker Compose port issue. Cannot launch docker project on localhost
Name an image built from running a docker-compose file
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file
issues in buiding Slate with Docker
Invalid type error in Docker Compose
Django cookiecutter with Docker add pip package
Docker Compose + Swarm + Machine Networking issue
docker-compose build image parameters --force-rm --pull
linking 2 containers through docker compose
Files created by manage.py commands not chown'd from root user
Is it possible to create an intermediate image within docker-compose?

Categories

HOME
c#
qlikview
airflow
drupal
logging
autohotkey
sql-server-2014
jenkins-pipeline
weblogic
apache-storm
c++builder
livecharts
coordinates
python-3.4
virtualhost
token
digital
ng2-charts
fine-uploader
comma
saucelabs
web-testing
background-image
taxonomy
simd
google-calendar-api3
views
legend-properties
aws-devicefarm
webgl-earth
cherrypy
lotusscript
android-xml
pixels
rollupjs
setup-project
folder
wordpress-rest-api
storefront
unity3d-5
traitsui
odp.net
wunderground
perf
kofax
outlook-2010
rythm
mockserver
mediastream
susy
compiled-query
ocpjp
weld
angular-fullstack
import.io
lucee
reloaddata
business-catalyst
catalyst
scanf
therubyracer
spring-social-twitter
glade
toggleclass
ldd
magick.net
vitamio
mrunit
razorengine
jcalendar
fadein
dday
ios8-share-extension
windows-kernel
play-json
winforms-interop
playn
genero
autopep8
backtrace
quickfixn
xts
visual-c#-express-2010
twitter-finagle
visual-studio-setup-proje
hotlinking
satisfiability
power-management
autofilter
mahara
fade
static-class
violation
record-locking
typography
wpa
infinity.js
uikit-dynamics
windows-scheduler
nsautoreleasepool
gwt2
ncml
wpml
hypertable
mvcmailer
motorola-droid
stl-algorithm
vectorwise
peoplepicker
xhtmlrenderer
subdirectories
database-agnostic
silverlight-2.0
linq-to-mysql
konsole
asp.net-1.1

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