This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: $$PVC_NAME$$ | |
spec: | |
accessModes: | |
- $$ACCESS_MODE$$ | |
resources: | |
requests: | |
storage: $$STORAGE_SIZE$$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:latest | |
stages: | |
- build | |
- test | |
- deploy | |
variables: | |
IMAGE_NAME: myimage # A modifier | |
before_script: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:latest # Nom de l'image docker dans laquelle tous les étapes (stages) du pipeline seront exécutées | |
stages: # Déclaration de l'ensemble des étapes qui composent le pipeline | |
- build # La liste proposée ici n'est pas exhaustive | |
- test | |
- deploy | |
variables: # Il est possible de déclarer des variables | |
VAR1: value1 # Peut-être accédée via ${VAR1} | |
# VAR2: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:8 | |
# Create app directory | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
COPY app.js ./ | |
RUN npm install | |
EXPOSE 3000 | |
CMD [ "npm", "start" ] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "docker_web_app", | |
"version": "1.0.0", | |
"description": "Node.js on Docker", | |
"author": "Denis Peyrusaubes <[email protected]>", | |
"main": "app.js", | |
"scripts": { | |
"start": "node app.js" | |
}, | |
"dependencies": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const app = express() | |
app.get('/', function (req, res) { | |
var ip = require('ip'); | |
res.send('Hello fom host ' + ip.address()) | |
}) | |
app.get('/color', function (req, res) { | |
res.send('bleu') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#1: Voiture avec des propriétés publiques | |
class Voiture1 { | |
couleur: string; | |
vitesseMax: number; | |
constructor(c: string, v: number) { | |
this.couleur = c; | |
this.vitesseMax = v; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.retengr.model; | |
/** | |
* Created by denis on 07/03/2018. | |
*/ | |
public class State { | |
private String abbreviation; | |
private String name; | |
public String getAbbreviation() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.retengr.model; | |
/** | |
* Created by denis on 07/03/2018. | |
*/ | |
public class Orders { | |
private String productName; | |
private double itemCost; | |
public String getProductName() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.retengr.model; | |
import org.springframework.data.annotation.Id; | |
/** | |
* Created by denis on 07/03/2018. | |
*/ | |
public class Customers { | |
@Id | |
private String id; |
NewerOlder