diff --git a/.gitignore b/.gitignore index 8721b15..bddf4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ -scripts/data/combined_data_cleaned.csv -scripts/data/combined_data.csv +# ignore the data files +01-basic-deployment/scripts/data/combined_data_cleaned.csv +01-basic-deployment/scripts/data/combined_data.csv -scripts/extract_done -scripts/transform_done \ No newline at end of file +# ignore the done files +01-basic-deployment/scripts/extract_done +01-basic-deployment/scripts/transform_done \ No newline at end of file diff --git a/Dockerfile b/01-basic-deployment/Dockerfile similarity index 100% rename from Dockerfile rename to 01-basic-deployment/Dockerfile diff --git a/app/entrypoint_extract.sh b/01-basic-deployment/app/entrypoint_extract.sh similarity index 100% rename from app/entrypoint_extract.sh rename to 01-basic-deployment/app/entrypoint_extract.sh diff --git a/app/entrypoint_load.sh b/01-basic-deployment/app/entrypoint_load.sh similarity index 100% rename from app/entrypoint_load.sh rename to 01-basic-deployment/app/entrypoint_load.sh diff --git a/app/entrypoint_transform.sh b/01-basic-deployment/app/entrypoint_transform.sh similarity index 100% rename from app/entrypoint_transform.sh rename to 01-basic-deployment/app/entrypoint_transform.sh diff --git a/docker-compose.yml b/01-basic-deployment/docker-compose.yml similarity index 100% rename from docker-compose.yml rename to 01-basic-deployment/docker-compose.yml diff --git a/requirements.txt b/01-basic-deployment/requirements.txt similarity index 100% rename from requirements.txt rename to 01-basic-deployment/requirements.txt diff --git a/scripts/.DS_Store b/01-basic-deployment/scripts/.DS_Store similarity index 100% rename from scripts/.DS_Store rename to 01-basic-deployment/scripts/.DS_Store diff --git a/scripts/data/fm-ad-notebook-visualization-COMPLETED.ipynb b/01-basic-deployment/scripts/data/fm-ad-notebook-visualization-COMPLETED.ipynb similarity index 100% rename from scripts/data/fm-ad-notebook-visualization-COMPLETED.ipynb rename to 01-basic-deployment/scripts/data/fm-ad-notebook-visualization-COMPLETED.ipynb diff --git a/scripts/extract.py b/01-basic-deployment/scripts/extract.py similarity index 100% rename from scripts/extract.py rename to 01-basic-deployment/scripts/extract.py diff --git a/scripts/load.py b/01-basic-deployment/scripts/load.py similarity index 100% rename from scripts/load.py rename to 01-basic-deployment/scripts/load.py diff --git a/scripts/transform.py b/01-basic-deployment/scripts/transform.py similarity index 100% rename from scripts/transform.py rename to 01-basic-deployment/scripts/transform.py diff --git a/docker-guides/docker-compose.md b/docker-guides/docker-compose.md new file mode 100644 index 0000000..0931a7d --- /dev/null +++ b/docker-guides/docker-compose.md @@ -0,0 +1,28 @@ +# Cleaning Up Docker Deployments + +To clean up after using `docker-compose up`, you can use the following commands to stop and remove containers, networks, volumes, and images created by Docker Compose: + +## Stop and Remove Containers +This command will stop and remove all containers defined in the `docker-compose.yml` file. + +```sh +docker-compose down +``` + +## Remove Containers, Networks, Volumes, and Images +This command will remove containers, networks, and images created by docker-compose up. The -v flag is used to remove named volumes declared in the volumes section of the Compose file and anonymous volumes attached to containers. + +```sh +docker-compose down --volumes --remove-orphans +``` +## Remove All Unused Docker Data + +If you want to remove all unused Docker data, including stopped containers, networks, images, and build cache, use the following command: + +```sh +docker system prune -a --volumes +``` + +Note: +- -a will also remove all unused images not just dangling ones. +- --volumes will remove all unused volumes.