mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2025-12-16 14:07:49 +01:00
test
This commit is contained in:
parent
ec371e0db1
commit
cc9660b562
2
.env
2
.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]
|
||||
|
||||
|
||||
109
README.md
109
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
|
||||
|
||||
@ -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!")
|
||||
|
||||
4
makefile
4
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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user