cleanup and add test compose file
This commit is contained in:
parent
7b3e675bf6
commit
a45706aa98
7 changed files with 114 additions and 1 deletions
1
api/.dockerignore
Normal file
1
api/.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
node_modules
|
19
api/Dockerfile
Normal file
19
api/Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
FROM mhart/alpine-node:6.9.4
|
||||
|
||||
# Copy dependency file
|
||||
COPY package.json /app/package.json
|
||||
|
||||
# Install dependencies
|
||||
RUN cd /app && npm install
|
||||
|
||||
# Copy src files
|
||||
COPY . /app/
|
||||
|
||||
# Use /app working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Expose http port
|
||||
EXPOSE 3000
|
||||
|
||||
# Run application
|
||||
CMD ["npm", "start"]
|
|
@ -10,6 +10,7 @@
|
|||
"cookie-parser": "~1.4.3",
|
||||
"express": "~4.15.5",
|
||||
"jade": "~1.11.0",
|
||||
"mongodb": "^3.0.1",
|
||||
"serve-favicon": "~2.4.5",
|
||||
"winston": "^2.4.0"
|
||||
}
|
||||
|
|
75
data/db-dump.json
Normal file
75
data/db-dump.json
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
"events": [
|
||||
{
|
||||
"type": "docker-meetup",
|
||||
"title": "Meetup Docker / RivieraJug",
|
||||
"date": "18/01/2018",
|
||||
"desc": "Anthony Lapenna</b> viendra nous présenter <b>Portainer</b> pour gérez vos environnements Docker en toute simplicité</p>",
|
||||
"link": "https://www.meetup.com/fr-FR/Docker-Nice/events/245650434/",
|
||||
"pict": "docker.png"
|
||||
},
|
||||
{
|
||||
"type": "hashicorp-meetup",
|
||||
"title": "Hashicorp User Group #2",
|
||||
"date": "23/01/2018",
|
||||
"desc": "Thomas Sarboni</b> fera une introduction à <b>Terraform</b>, <b>David Calvert</b> nous présentera <b>Vault</b>",
|
||||
"link": "https://www.meetup.com/fr-FR/Sophia-Antipolis-HashiCorp-User-Group/events/246742297/",
|
||||
"pict": "hashicorp.png"
|
||||
},
|
||||
{
|
||||
"type": "telecomvalley",
|
||||
"title": "",
|
||||
"date": "25/01/2018",
|
||||
"desc": "Retour d'expérience sur l'utilisation de <b>Kafka</b> par <b>Sébastien Alegret</b> de GreenCom Network",
|
||||
"link": "http://telecom-valley.fr/25-janvier-commission-open-source/",
|
||||
"pict": "telecomvalley-cos.png"
|
||||
},
|
||||
{
|
||||
"type": "cncf-meetup",
|
||||
"title": "CNCF Sophia-Antipolis #1",
|
||||
"date": "29/01/2018",
|
||||
"desc": "Cédric Lamorinière</b> et <b>David Benque</b> vous présenterons <b>Prometheus</b> une solution de monitoring pour le système et les applications",
|
||||
"link": "https://www.meetup.com/fr-FR/CNCF-Cloud-Native-Computing-Sophia-Antipolis/events/246424155/",
|
||||
"pict": "cncf.png"
|
||||
},
|
||||
{
|
||||
"type": "rivierajug",
|
||||
"date": "06/02/2018",
|
||||
"desc": "Présentation de la base de données <b>Hazelcast</b> par <b>Neil Stevenson</b>",
|
||||
"link": "http://rivierajug.org/xwiki/bin/view/Main/201802-hazelcast",
|
||||
"pict": "rivierajug.png"
|
||||
},
|
||||
{
|
||||
"type": "telecomvalley",
|
||||
"title": "",
|
||||
"date": "20/02/2018",
|
||||
"desc": "Présentation de <b>Open Source Business Diagnostic</b> par <b>Jaime Arredondo</b> (BoldAndOpen.com)",
|
||||
"link": "",
|
||||
"pict": "telecomvalley-cos.png"
|
||||
},
|
||||
{
|
||||
"type": "telecomvalley",
|
||||
"title": "",
|
||||
"date": "15/03/2018",
|
||||
"desc": "Introduction à la programmation fonctionnelle par <b>Yann Esposito</b>. Attention, <b>Haskell</b> au programme...",
|
||||
"link": "",
|
||||
"pict": "telecomvalley-cos.png"
|
||||
},
|
||||
{
|
||||
"type": "rivieradev",
|
||||
"title": "",
|
||||
"date": "16-17-18/05/2018",
|
||||
"desc": "<b>Riviera DEV</b> c'est <b>3 jours de conférences et d'ateliers</b> sur un large panel de sujets : langages de programmation, Front-end & UX, Mobile & IoT, Big Data & Machine Learning, Containers & DevOps, Performance, Agilité ...",
|
||||
"link": "http://rivieradev.fr",
|
||||
"pict": "rivieradev.png"
|
||||
},
|
||||
{
|
||||
"type": "sophiaconf",
|
||||
"title": "",
|
||||
"date": "2-5/07/2018",
|
||||
"desc": "3 soirées de talks et une journée entièrement dédiée à des workshops techniques. Au programme cette année: AI, DevOps et Cloud, IoT. Les CFPs sont ouverts !",
|
||||
"link": "http://telecom-valley.fr/sophiaconf-2018-appel-a-orateurs/",
|
||||
"pict": "sophiaconf2018.png"
|
||||
}
|
||||
]
|
||||
}
|
3
data/restore.sh
Executable file
3
data/restore.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
db=$(docker ps -q --filter label=com.docker.compose.service=db)
|
||||
docker cp db-dump.json $db:/tmp/db-dump.json
|
||||
docker exec $db mongoimport -c events -d sophia --mode upsert --file /tmp/db-dump.json
|
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
version: '3.4'
|
||||
services:
|
||||
www:
|
||||
build: ./www
|
||||
ports:
|
||||
- 8080:80
|
||||
api:
|
||||
build: ./api
|
||||
ports:
|
||||
- 8081:3000
|
||||
db:
|
||||
image: mongo:3.6
|
||||
ports:
|
||||
- 27017:27017
|
|
@ -1,3 +1,3 @@
|
|||
mustache events.json index.mustache > index.html
|
||||
mustache ../data/events.json index.mustache > index.html
|
||||
|
||||
python -m SimpleHTTPServer 8000
|
||||
|
|
Loading…
Reference in a new issue