Skip to content

Docker compose files to install necessary dev resources (data).

Notifications You must be signed in to change notification settings

AlonCG/cdf-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

core data foundation - local

v0.2-alpha, April 2021

Why another docker-compose file? After a catastrophic hardware failure and dev machine replacement, I opted to try the docker route.

The aim of cdf-local is to make [re]configuring my development environment easier as well as have the ability to control local data services with a single "docker-compose" command. The initial version uses docker-compose, though a kubernetes approach is being considered. As this is my first attempt using docker containers on my dev machine, I'll be looking for more efficient ways in the future. [Any suggestions would be appreciated.]

These containers are focused on providing the data foundation used in my development environment and will be modified as needed. They are common services I add to many of my projects. I've often at times also just need a data-store to test against without an actual application. So instead of installing all the services locally on my dev machine, I've used docker containers. Of course, my projects that rely on custom resources have those specifics added as needed. Note: This was created on a Windows 10 machine, so it has not yet been tested on other platforms.


Installation Steps

Pre-reqs: Docker (and docker-compose) should be set up and running correctly.

  1. Clone the cdf-local repo to your local drive.
  2. Create a new external network using docker: docker network create cdflocal-mesh.
  3. Change the default user names or passwords in the .env file.
  4. In the ./server-conf/redis folder, modify the redis.conf file as desired.
  5. In the ./server-conf/mongo/docker-entrypoint-initdb.d folder, modify the mongo-init.js file as desired.
  6. Update the various docker-config files as needed.
  7. Run the ./docker-up.ps1 script to execute docker compose up --build on the compose files.
  8. Run the ./docker-down.ps1 script to shut down all containers as needed.

cdf-local docker-compose files

dockup-up.ps1 script

This PowerShell helper script can be used to build or start (docker compose up) all containers. Switches:

  • -BuildOnly:$true, executes docker compose build instead of docker compose up
  • -Azure:$true, adds docker-compose-azure.yml file to the docker compose up command
  • -Force:$true, appends --force-recreate --renew-anon-volumes to the docker compose up command
  • -Detach:$true, appends --detach to the docker compose up command

The companion files ... docker-down.ps1 runs docker compose down on all containers, docker-stop.ps1 runs docker compose stop on all containers.


References & Thanks!

Thanks to all the old-hats out there that have been blogging for years and the official sites/documentation that exists. Though this took me a bit longer than I initially forecast, the learning was worth it. Other than the official doc sites, here is a list of sites that continue to assist me in my journey:


About

Docker compose files to install necessary dev resources (data).

Resources

Stars

Watchers

Forks

Packages

No packages published