├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── docker-compose.yml
├── lucee
├── lucee-server.xml
└── lucee-web.xml.cfm
├── scripts
└── entrypoint.sh
└── www
├── index.cfm
└── installhelper
├── mura.cfm
└── slatwall.cfm
/.gitignore:
--------------------------------------------------------------------------------
1 | *.project
2 | *.settings
3 | *.DS_Store
4 | *.zip
5 | *.lic
6 | *.pfx
7 | _notes/
8 | aspnet_client/
9 | settings.xml
10 | ehthumbs.db
11 | thumbs.db
12 | settings.xml/
13 | logs/
14 | WEB-INF
15 | .rdsTempFiles/
16 |
17 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM lucee/lucee:4.5.3-t8.0.36
2 | MAINTAINER Greg Moser, greg.moser@ten24web.com
3 |
4 | RUN apt-get update && apt-get install -y uuid-runtime
5 |
6 | # Copy over the Lucee Config Files
7 | COPY lucee/lucee-server.xml /opt/lucee/server/lucee-server/context/lucee-server.xml
8 | COPY lucee/lucee-web.xml.cfm /opt/lucee/web/lucee-web.xml.cfm
9 |
10 | # Expose Ports
11 | EXPOSE 8080
12 |
13 | # Copy the projects www contents over
14 | COPY www /var/www
15 |
16 | COPY scripts/entrypoint.sh /entrypoint.sh
17 | ENTRYPOINT ["/entrypoint.sh"]
18 |
19 | CMD ["catalina.sh", "run"]
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Greg Moser
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Docker Lucee MySQL
2 | This is a starter template git repo for running a Database dirven applications on Docker with Lucee & MySQL. It is designed to be copied and used as a git repo for your next web application project.
3 |
4 | If you plan to use an open source CFML application (Mura, Slatwall, etc.), this repo also has some code for installing those types of applications automatically on first run. We welcome any other open source applications to be added to this repo as well.
5 |
6 | Not only will this simplify team development, but it will also allow you to run your application in the cloud using tutum by docker for test, staging & production enviornments.
7 |
8 | # Key Features
9 |
10 | - Run your application with no install of Lucee or MySQL
11 | - Consistent development enviornment for all team members
12 | - Take DB snapshots during development, and pass around to other team members with the codebase (via git)
13 | - Push application to cloud using Tutum / Cloud Provider (AWS, DigitalOcean, Google, etc.)
14 | - Configure your development enviornments via repo
15 | - Configure your production enviornments via repo
16 |
17 |
18 | # Requirements
19 |
20 | - git
21 | - docker toolbox (with docker-compose version >= 1.6)
22 |
23 |
24 | # Quickstart
25 |
26 | To get up and running simply navigate to where you want to run your project and do:
27 |
28 | ```
29 | git clone https://github.com/gregmoser/docker-lucee-mysql.git myProjectName
30 | ```
31 |
32 | Then open up the docker quickstart terminal that was installed with docker toolbox, and make a note of the IP address it is running on.
33 |
34 | Navigate to the new project directory
35 |
36 | ```
37 | cd myProjectName
38 | ```
39 |
40 | run the following command to start your project
41 |
42 | ```
43 | docker-compose up
44 | ```
45 |
46 | Thats It! Navigate to the IP address of the docker machine you're running (that you noted above when starting the terminal). You can also open kitematic to see the web app running, and click on the web preview link
47 |
48 |
49 | # Important Next Steps
50 |
51 | Now that you've got the application up and running it's important to take a few next steps so that the repo works for YOUR project.
52 |
53 | Open the git config
54 | ```
55 | /myProjectName/.git/config
56 | ```
57 |
58 | It should look something like this:
59 | ```
60 | [core]
61 | symlinks = false
62 | repositoryformatversion = 0
63 | filemode = true
64 | logallrefupdates = true
65 | precomposeunicode = true
66 | [remote "origin"]
67 | url = https://github.com/gregmoser/docker-lucee-mysql.git
68 | fetch = +refs/heads/*:refs/remotes/origin/*
69 | [branch "master"]
70 | remote = origin
71 | merge = refs/heads/master
72 | ```
73 |
74 | You want to change the url under origin to be something like
75 | ```
76 | [remote "origin"]
77 | url = https://github.com/MY_GITHUB_USERNAME/MY_PROJECT_NAME.git
78 | fetch = +refs/heads/*:refs/remotes/origin/*
79 | ```
80 |
81 | From that point forward all of your team members will just pull from this new git repo that you have setup. They will be starting from the point that you left off. All of your projects code lives in the /www folder so you and your co-workers can work, commit, push & pull as needed.
82 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 | services:
3 | web:
4 | build: .
5 | ports:
6 | - "80:8080"
7 | volumes:
8 | - ./www:/var/www
9 | links:
10 | - appdb
11 | environment:
12 | LUCEE_PASSWORD: MakeThisSecretLuceeAdminPassword!
13 | MYSQL_ROOT_PASSWORD : MakeThisSecretMySQLRootPassword!
14 | MYSQL_HOST : appdb
15 | MYSQL_DATABASE : appdatabase
16 | appdb:
17 | image: mysql
18 | ports:
19 | - "3306:3306"
20 | volumes:
21 | - /var/lib/mysql
22 | environment:
23 | MYSQL_ROOT_PASSWORD : MakeThisSecretMySQLRootPassword!
24 | MYSQL_DATABASE : appdatabase
--------------------------------------------------------------------------------
/lucee/lucee-server.xml:
--------------------------------------------------------------------------------
1 |
28 | If you are seeing this screen it is because you are running the lucee project for the first time and have not defined a "BASE_APP_INSTALL" enviornment variable.
29 |
31 | Don't WORRY! You can install an application right here from this screen administrator. When the application is installed it will remove this helper app.
32 |
33 |
36 |
38 | If you would just like to code up your own custom app, go ahead and delete the files in the www directory and get started! 39 |
40 |41 | TODO: Make this page more informative and better looking :) 42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /www/installhelper/mura.cfm: -------------------------------------------------------------------------------- 1 | 2 |