diff --git a/.env b/.env index 12e9e31..fbaed20 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # Django settings -SECRET_KEY="F0!!0w the @h\$te Raββ\$t" +SECRET_KEY="FollowTheWhiteRabbit" DEBUG=True DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] diff --git a/README.md b/README.md index 9cc4390..93dbd37 100644 --- a/README.md +++ b/README.md @@ -1,107 +1,4 @@ -# Installing Docker and Docker Compose on Ubuntu - -This guide will help you install Docker and Docker Compose on an Ubuntu system. - -## Prerequisites - -- A system running Ubuntu (preferably 20.04 LTS or later) -- A user account with `sudo` privileges - -## Installing Docker - -1. **Update the package index:** - - ```bash - sudo apt update - ``` - -2. **Install required packages:** - - ```bash - sudo apt install apt-transport-https ca-certificates curl software-properties-common - ``` - -3. **Add Docker's official GPG key:** - - ```bash - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - ``` - -4. **Set up the Docker repository:** - - ```bash - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - ``` - -5. **Update the package index again:** - - ```bash - sudo apt update - ``` - -6. **Install Docker CE:** - - ```bash - sudo apt install docker-ce - ``` - -7. **Check the Docker service status:** - - ```bash - sudo systemctl status docker - ``` - -8. **Add your user to the `docker` group to run Docker commands without `sudo`:** - - ```bash - sudo usermod -aG docker $USER - ``` - -9. **Log out and log back in to apply the group changes.** - -## Installing Docker Compose - -1. **Download Docker Compose:** - - ```bash - sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose - ``` - -2. **Apply executable permissions to the Docker Compose binary:** - - ```bash - sudo chmod +x /usr/local/bin/docker-compose - ``` - -3. **Verify the installation:** - - ```bash - docker-compose --version - ``` - -## Verifying Docker and Docker Compose Installation - -1. **Run a simple Docker container:** - - ```bash - docker run hello-world - ``` - - This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message. - -2. **Check Docker Compose version:** - - ```bash - docker-compose --version - ``` - - This command outputs the version of Docker Compose installed. - -Congratulations! You have successfully installed Docker and Docker Compose on your Ubuntu system. - -## Additional Resources - -- [Docker Documentation](https://docs.docker.com/) -- [Docker Compose Documentation](https://docs.docker.com/compose/) - +### Installing Docker and Docker Compose on Ubuntu +## ADVICE +- The bash script included in the docker-compose.yml file only works with alphanumeric characters diff --git a/helloworld/views.py b/helloworld/views.py index 009ec84..68caa0f 100644 --- a/helloworld/views.py +++ b/helloworld/views.py @@ -1,4 +1,4 @@ from django.http import HttpResponse def index(request): - return HttpResponse("Hello, CHAKIB est une trompette!") + return HttpResponse("Hello, CHAKIB est une trompette ou pas!") diff --git a/makefile b/makefile index ca790f2..2f123a4 100644 --- a/makefile +++ b/makefile @@ -22,6 +22,10 @@ down: destroy: $(COMPOSE) down -v --rmi all sudo rm -rf $$PWD/data/db + sudo lsof -i :5432 | awk 'NR>1 {print $$2}' | xargs sudo kill -9 || true + +kill-5432: + sudo lsof -i :5432 | awk 'NR>1 {print $$2}' | xargs sudo kill -9 || true logs: $(COMPOSE) logs -f $(CONTAINER)