Skip to content

Commit ffed046

Browse files
committed
update
1 parent 5bc79c8 commit ffed046

File tree

8 files changed

+77
-3
lines changed

8 files changed

+77
-3
lines changed

best_practise/README.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Bonne pratiques devops
2+
3+
- vresionner l'infra
4+
- eviter la duplication / permet de standardiser l'infra
5+
- des la conception du projet
6+
- repo transverse entre les modules
7+
8+
9+
- commencer par automatiser l'install d'une vm (ansible vs chef)
10+
- creant des module
11+
- variables
12+
-
13+
14+
terraform --> creationdes machines
15+
16+
gestion de config
17+
18+
-

tp_docker_app_js/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# TP2 Docker
2+
3+
4+
## Compléter le Dockerfile pour pouvoir builder l'application
5+
6+
npm est le gestionnaire de paquets par défaut pour l'environnement d'exécution JavaScript Node.js de Node.js. npm se compose d'un client en ligne de commande, également appelé npm, et d'une base de données en ligne de paquets publics et privés payants, appelée le registre npm.
7+
8+
L'option npm permettant d'installer seulement les paquets necessaire est `--production`
9+
10+
11+
Running npm install without arguments installs modules defined in the dependencies section of the package.json file.
12+
It's important that npm install is run in the same directory as the package.json file.
13+
14+
La bonne pratique est d'installer le moins de packet possible pour avoir des images légère, utiliser cette option est alors la meilleure pratique concernant l'installation des packets nécessaire a notre application.
15+
+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM node:12-alpine3.9
22

3+
COPY . .
4+
35
RUN npm install --production
46

57
CMD ["node", "src/index.js"]

tp_docker_app_js/tp-docker-2/docker-compose.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@ version: '3.9'
33
services:
44
node:
55
image: ma_super_app:1.0.0
6+
environment:
7+
DATABASE_HOST: db
8+
DATABASE_PORT: 3306
9+
DATABASE_USERNAME: user
10+
DATABASE_PASSWORD: upassword
11+
DATABASE_NAME: lab
12+
ports:
13+
- 3000:3000
14+
links:
15+
- db
616

7-
mysql:
8-
image: mysql
17+
db:
18+
image: mysql:5.7
919
environment:
1020
MYSQL_USER: user
1121
MYSQL_PASSWORD: upassword

tp_lamp/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Mise en place LAMP avec Docker
2+

tp_lamp/docker-compose.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: '3.9'
2+
3+
services:
4+
web:
5+
image: httpd
6+
volumes:
7+
- "./app:/usr/local/apache2/htdocs/"
8+
ports:
9+
- 80:80
10+
11+
db:
12+
image: mysql
13+
environment:
14+
MYSQL_USER: user
15+
MYSQL_PASSWORD: upassword
16+
MYSQL_DATABASE: lab
17+
MYSQL_ROOT_PASSWORD: password
18+
19+
php:
20+
image: php
21+
22+
adm:
23+
image: phpmyadmin/phpmyadmin
24+
ports:
25+
- 8080:80
26+
depends_on:
27+
- db
File renamed without changes.

tp_manage_docker/apps/images/dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM httpd:2.4 
1+
FROM httpd:2.4
22

33

44
COPY apache/ /usr/local/apache2/htdocs/

0 commit comments

Comments
 (0)