divers:github
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| divers:github [2024/09/14 09:57] – root | divers:github [2025/03/25 08:07] (Version actuelle) – root | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | ===== Ajouter à un nouveau repository ===== | ||
| <code bash>git init | <code bash>git init | ||
| git config --global init.defaultBranch main | git config --global init.defaultBranch main | ||
| Ligne 6: | Ligne 7: | ||
| git commit -am " | git commit -am " | ||
| git push origin main | git push origin main | ||
| - | |||
| - | |||
| </ | </ | ||
| + | Version alternative: | ||
| + | <code bash> | ||
| + | git remote add origin git@github.com: | ||
| + | git add . | ||
| + | git commit -m " | ||
| + | git push -u origin main | ||
| + | git pull origin main | ||
| + | </ | ||
| ===== Cloner une branche en particulier ===== | ===== Cloner une branche en particulier ===== | ||
| - | <code bash>====== Odoo: Docker install ====== | + | <code bash>git clone -b uat git@github.com:makeitsimple-git/ |
| - | ===== Préparation | + | ===== Pousser des branches vers des autres |
| + | Exemple: migrer la branche vincent vers uat | ||
| + | <code bash>git push origin vincent: | ||
| + | autre cas on souhaiter remettre à jour la branche vincent avec le code d'uat en cours: | ||
| <code bash> | <code bash> | ||
| - | # | + | git checkout vincent |
| - | apt install docker-compose | + | git merge uat </ |
| - | + | ||
| - | #Création des répertoires | + | |
| - | mkdir -p docker_volume/ | + | |
| - | setfacl -d -m u:101:rwX -m u: | + | |
| - | setfacl | + | |
| - | setfacl -d -m u:999:rwX -m u: | + | |
| - | setfacl | + | |
| - | </ | + | |
| - | + | ||
| - | ===== Docker configuration ===== | + | |
| - | + | ||
| - | <code bash> | + | |
| - | + | ||
| - | <file yaml docker-compose.yml> | + | |
| - | version: ' | + | |
| - | services: | + | |
| - | odoo: | + | |
| - | image: odoo:17.0 | + | |
| - | env_file: .env | + | |
| - | depends_on: | + | |
| - | - postgres | + | |
| - | ports: | + | |
| - | - 8069:8069 | + | |
| - | volumes: | + | |
| - | - type: bind | + | |
| - | source: ./ | + | |
| - | target: / | + | |
| - | + | ||
| - | + | ||
| - | postgres: | + | |
| - | image: postgres: | + | |
| - | env_file: .env | + | |
| - | volumes: | + | |
| - | - type: bind | + | |
| - | source: ./ | + | |
| - | target: / | + | |
| - | </ | + | |
| - | + | ||
| - | <code bash> | + | |
| - | <file - .env> | + | |
| - | # postgresql environment variables | + | |
| - | POSTGRES_DB=postgres | + | |
| - | POSTGRES_PASSWORD=a_strong_password_for_user | + | |
| - | POSTGRES_USER=odoo | + | |
| - | PGDATA=/ | + | |
| - | + | ||
| - | # odoo environment variables | + | |
| - | HOST=postgres | + | |
| - | USER=odoo | + | |
| - | PASSWORD=a_strong_password_for_user | + | |
| - | </ | + | |
| - | + | ||
| - | ===== Utilisation de docker ===== | + | |
| - | + | ||
| - | <code bash> | + | |
| - | # Pour lancer en mode foreground | + | |
| - | docker-compose up | + | |
| - | # Pour lancer en mode daemon | + | |
| - | docker-compose up -d | + | |
| - | # Pour stopper | + | |
| - | docker-compose stop | + | |
| - | + | ||
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | ===== Cloner le projet ===== | + | |
| - | + | ||
| - | <code bash>git clone -b uat git@github.com: | + | |
divers/github.1726307872.txt.gz · Dernière modification : de root
