Docker-CLI process for development.
Execute the development docker files
Create the docker container for the client (React app)
Inside the client folder execute
docker build -f Dockerfile.dev .
docker run <imageId>
Create the docker container for the server (Node apps)
Inside the server folder execute
docker build -f Dockerfile.dev .
docker run <imageId>
This will show an error because the database is not running yet. Postgres and Redis are not running yet.
Create the docker container for the worker (Node apps)
Inside the worker folder execute
docker build -f Dockerfile.dev .
docker run <imageId>
Docker-Compose process for development
In the root folder execute
docker-compose up
Production Multiple-Container deployments flow
- Push code to github
- Travis automatically pulls repo
- Travis builds a test image, tests code
- Travis builds prod images
- travis pushes built prod images to Docker Hub
- Travis pushes project to AWS EB
- EB pulls images from Docker Hub and deploys
Travis flow
- Specify docker as a dependency
- Build test version of React project(use the development docker file because only this file has all the source code required for running the tests)
- Run tests
- Build prod versions of all projects
- Push all to Docker Hub
- Tell EB to update