BoxLang š A New JVM Dynamic Language Learn More...
Assets for the project are compiled using WebPack, which allows for minification and consolidation of Javascript and CSS dependencies for the application. You will need the following installed, in order to compile the static assets for for the application:
Once the above dependencies are installed and configured, from the root of the site run:
npm install
This first command will install all necessary libraries for asset compilation. The three commands for asset compilation are defined in the script
section of the package.json
file in the root of of the project ( all of which leverage the base webpack
command ). They are:
npm run dev
- compiles the assets for development without continuing to watch for changes
npm run watch
- compiles the assets for development and continues to watch for changes until Ctrl+C
triggers an exit
npm run prod
- compiles the assets for production. This process is more intensive because of advanced minification and cache-busting features built in to the production compilation.
Note: Since the generated rev-manifest.json
file contents are cached, switching between the dev
and prod
compilations will require a framework reinit for the file path changes to be reflected in the application
The following paths are automatically compiled via convention:
/resources/assets/js
- compiles to /includes/js
/resources/assets/sass
- compiles to /includes/css
The following dependencies will need to be installed on your machine prior to starting the environment for the first time:
127.0.0.
or 192.168.99.100
)Docker (w/GUI) - https://docs.docker.com/docker-for-mac/
Docker (Homebrew) - brew install docker docker-compose
If your installation did not already created a default Docker machine, do so now. Your machine requires at least 5GB of memory to run all of the required containers.
docker-machine create default --virtualbox-memory "5120" && docker-machine start default
docker-compose up -d --build
- the -d
flag will start your containers in the background.--build
command has been run, you may omit the -d
flag ( for "daemon" ).docker-compose.yml
), you may run the command docker-compose logs [ compose service name ]
. To tail the output of the logs and limit it to the last 50 lines, use docker-compose logs --follow --tail=50 [ compose name ]
docker-compose help
for additional docker compose commandsdocker ps
and then "ssh" in to that container by running docker exec -it [ container ID ] bash
or by running docker-run [ compose service name] bash
You may also start/stop individual containers using the docker-compose start|stop|restart [ service name ]
. The service names are listed in the root docker-compose.yml
file:
mysql
- MySQL (MariaDB) Server Service Nameapp
- The Lucee application serverTo use the start/stop/restart commands, however the container must first be built. To rebuild and start and indvidual container in the background you would use the following command:
docker-compose up -d --build [ service name ]
From that point on, you can use the start|stop|restart
commands.
You may also stop individual containers from the command line. To do so, run docker ps
to show a list of running containers. The ID of the container will be the hash on the left of the container row in the output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4d3f96cd409d ortussolutions/contentbox "/bin/sh -c ${BUILD_ā¦" 3 hours ago Up 3 hours (unhealthy) 0.0.0.0:61651->8080/tcp, 0.0.0.0:61653->8443/tcp cbcommerce_app_1
3af094131695 mariadb "docker-entrypoint.sā¦" 3 hours ago Up 3 hours 0.0.0.0:3307->3306/tcp cbcommerce_mysql_1
To stop our MySQL container, for example, we would run docker stop cbcommerce_mysql_1
, which would shutdown the container normally. To force a container to stop we would use the kill
directive docker kill 3af094131695
or docker kill cbcommerce_mysql_1
.
If you need to restore your environment to a fresh state, simply stop all containers using docker-compose stop
or docker-compose down
and then run the command docker system prune
, which will remove all containers, images, and volume references which are not in use.
Sometimes, if configuration issues are suspected, you may need to enter a running container to look around. There are several ways to do this:
docker-compose run -T [service name] bash
docker-compose exec -T [ service name ] bash
docker exec -it [ CONTAINER ID FROM docker ps ] bash
For additional help information on available compose and docker commands, run docker-compose [ COMMAND ] --help
or docker [ COMMAND ] --help
docker-compose stop
( or Ctrl+C
if you did not start the processes as daemons ). You may also stop the individual containers: docker-compose stop weat-app
The pre-seeded administrative credentials for accessing the ContentBox admin and the cbCommerce store admin are:
admin
c6C0mm3rc3!
( this password is also the MySQL root password and the Lucee Administrator password )Upon the initial database container creation, a seeder database which contains a fully configured Contentbox installation, with the cbCommerce module activated, will be up and running. The base URLs of your your site are:
http://127.0.0.1:61651/
- ContentBox site homehttp://127.0.0.1:61651/store
- cbCommerce store homehttp://127.0.0.1:61651/cbAdmin
- ContentBox Administrator homehttp://127.0.0.1:61651/cbadmin/module/store/admin
- cbCommerce Store Admin within the ContentBox admin ( uses ContentBox authentication )http://127.0.0.1:61651/store/admin/app
- the standalone version of the cbCommerce admin which is framed in the ContentBox admin ( usefull for debugging and developing )To prevent port conflicts, the exposed port for the MySQL container is 3307. You can use any MySQL client, such as MySQL Workbench, to make a connection to the database. The credentials for the server are located in the docker-compose.yml
file in the root of the site.
The test suite for the application may be accessed at http://127.0.0.1:61651/tests
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
$
box install cbcommerce-ui