generated from GARAGENUM/web-deploy
Initial commit
This commit is contained in:
commit
1023aa1475
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM nginx:mainline-alpine
|
||||||
|
|
||||||
|
COPY ./html /usr/share/nginx/html
|
||||||
|
|
||||||
|
RUN chown -R nginx:nginx /usr/share/nginx/html && chmod -R 755 /usr/share/nginx/html && \
|
||||||
|
chown -R nginx:nginx /var/cache/nginx && \
|
||||||
|
chown -R nginx:nginx /var/log/nginx && \
|
||||||
|
chown -R nginx:nginx /etc/nginx/conf.d
|
||||||
|
RUN touch /var/run/nginx.pid && \
|
||||||
|
chown -R nginx:nginx /var/run/nginx.pid
|
||||||
|
|
||||||
|
USER nginx
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
62
README.md
Normal file
62
README.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# WEB DEPLOY
|
||||||
|
|
||||||
|
Ce projet modèle est pour déployer son site web via le CI/CD du garage
|
||||||
|
Pour plus d'informations: [https://docs.legaragenumerique.xyz/divers/devops/cicd/](https://docs.legaragenumerique.xyz/divers/devops/cicd/)
|
||||||
|
|
||||||
|
## CONFIGURATION
|
||||||
|
|
||||||
|
- Placer son site web dans le dossier html/ :
|
||||||
|
```bash
|
||||||
|
├── Dockerfile
|
||||||
|
├── html
|
||||||
|
│ ├── content
|
||||||
|
│ │ ├── page1.html
|
||||||
|
│ │ ├── page2.html
|
||||||
|
│ │ └── page3.html
|
||||||
|
│ ├── css
|
||||||
|
│ │ └── styles.css
|
||||||
|
│ └── index.html
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## PUBLICATION
|
||||||
|
|
||||||
|
1. Créer la branche deploy :
|
||||||
|
```bash
|
||||||
|
git checkout -b deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Pousser la branche deploy :
|
||||||
|
```bash
|
||||||
|
git push origin -u deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Le site est disponible à l'adresse https://username-nom_du_projet.legaragenumerique.xyz
|
||||||
|
|
||||||
|
exemple pour l'utilisateur greg avec un projet portfolio:
|
||||||
|
> https://greg-portfolio.legaragenumerique.xyz
|
||||||
|
|
||||||
|
:warning: Ne pas modifier la Dockerfile au risque que le projet ne soit pas déployé
|
||||||
|
|
||||||
|
## MISE A JOUR
|
||||||
|
|
||||||
|
- Pour mettre à jour son projet, pousser les updates sur la branche deploy
|
||||||
|
|
||||||
|
## DEPUBLICATION
|
||||||
|
|
||||||
|
1. Basculer sur une autre branche que deploy :
|
||||||
|
```bash
|
||||||
|
git checkout main
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Effacer la branche en local :
|
||||||
|
```bash
|
||||||
|
git branch -d deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Effacer la branche distante :
|
||||||
|
```bash
|
||||||
|
git push --delete origin deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
> Le site n'est plus en ligne
|
||||||
0
html/index.html
Normal file
0
html/index.html
Normal file
Loading…
x
Reference in New Issue
Block a user