Consolidating my docker learnings with a Plotly Dash App which uses Redis for caching and storage and Nginx for serving frontend.
docker-compose -f docker-compose.dev.yml up -d
Once the above command runs successfully, you'll be able to access the app at http://localhost:3000.
You can bring down this setup with the following command:
docker-compose -f docker-compose.dev.yml down
Once done with the development, image can be created using:
docker-compose -f docker-compose.dev.yml build
- Update the version in pyproject.toml file of the project.
- Rename the built image to correct format for pushing to docker hub
docker tag dash-in-docker_dash-docker snehilvj/dash-docker:<version>
docker push snehilvj/dash-docker:<version>
The image will be available here.
In order to run the setup in production, use the image just pushed to dockerhub (configured in docker-compose.prod.yml).
docker-compose -f docker-compose.prod.yml up -d