This commit is contained in:
Luc Juggery 2018-02-02 10:16:32 +01:00
parent a9e21611e1
commit 2142d01731
19 changed files with 340 additions and 36 deletions

4
.gitignore vendored
View file

@ -1,3 +1 @@
www/*.html js/node_modules
www/*_events.json
www/node_modules

View file

@ -18,21 +18,31 @@ A lot of great stuff is happening in Sophia:
Some people ask about a place that lists them all... here is a simple attempt that tries to answer this need. Some people ask about a place that lists them all... here is a simple attempt that tries to answer this need.
## How to run it ## Want to help making this website look better ? :)
Fell free to modify it and to submit a PR.
### Clone de repository ### Clone de repository
``` ```
$ git clone https://github.com/lucj/sophia.events.git $ git clone https://github.com/lucj/sophia.events.git && cd sophia.events
``` ```
### Run the wrapper scrip ### Run stack
This assumes you have [Docker](https://www.docker.com/community-edition#/download) / [Docker Compose](https://docs.docker.com/compose/install/) installed on your machine
``` ```
$ cd www && ./test.sh $ docker-compose up -d
``` ```
A web server is run in a Docker container. The port to use is provided at the end of the output. A web server is run in a Docker container available on port 8000.
### Modify the files
Fell free to modify the css / html.
Once you'r happy with your changes you can report the modifications of the html in the *template/index.mustache* file.
## Status ## Status

20
bin/build.sh Executable file
View file

@ -0,0 +1,20 @@
# Copy resources needed in the image build phase
cp ../template/index.mustache ../data/*.* ../www/
# Build image
cd ../www
docker image build -t lucj/sophia.events .
# Run website
ID=$(docker run -d -p 80 lucj/sophia.events)
# Copy generated index.html and past.html locally
docker cp $ID:/usr/share/nginx/html/index.html .
docker cp $ID:/usr/share/nginx/html/past.html .
# Remove files used for image build
rm index.mustache events.json clean_events.js package.json
# Get port
PORT=$(docker inspect --format '{{ (index (index .NetworkSettings.Ports "80/tcp") 0).HostPort }}' $ID)
echo "=> web site available on http://localhost:$PORT"

View file

@ -5,12 +5,13 @@ if [ "$version" = "" ]; then
version="latest" version="latest"
fi fi
#TODO: update service instead of single container
# docker service update www --image=...
# Pull new image # Pull new image
docker pull lucj/sophia.events:$version docker pull lucj/sophia.events:$version
# TODO
# Replace the following with a service update
# docker service update www --image=lucj/sophia.events
# Stop previous container # Stop previous container
docker stop events docker stop events
docker rm events docker rm events

1
bin/push.sh Executable file
View file

@ -0,0 +1 @@
docker push lucj/sophia.events

View file

@ -34,12 +34,12 @@
{ {
"id" : 4, "id" : 4,
"type": "cncf-meetup", "type": "cncf-meetup",
"title": "CNCF Sophia-Antipolis #1", "title": "",
"ts": "20180129T173000", "ts": "20180129T173000",
"date": "29/01 à 17h30", "date": "29/01 à 17h30",
"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", "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/", "link": "https://www.meetup.com/fr-FR/CNCF-Cloud-Native-Computing-Sophia-Antipolis/events/246424155/",
"pict": "cncf.png" "pict": "cncf-sophia.png"
}, },
{ {
"id" : 5, "id" : 5,

14
data/rss.js Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MakeUseOf RSS Feed</title>
<link>//sophia.events/</link>
<description>Upcoming technical events in Sophia-Antipolis</description>
<item>
<title>Entry Title</title>
<link>Link to the entry</link>
<guid>http://example.com/item/123</guid>
<pubDate>Sat, 9 Jan 2010 16:23:41 GMT</pubDate>
<description>[CDATA[ This is the description. ]]</description>
</item>
</channel>

View file

@ -1,16 +0,0 @@
#!/bin/sh
version=$1
if [ "$version" = "" ]; then
version="latest"
fi
# Pull new image
docker pull lucj/sophia.events:$version
# Stop previous container
docker stop events
docker rm events
# Run Docker stack
docker stack deploy -c docker-stack.yml sophia

10
docker-compose.yml Normal file
View file

@ -0,0 +1,10 @@
version: '3.4'
services:
www:
image: lucj/sophia.events
build: ./www
ports:
- 8000:80
restart: on-failure
volumes:
- ./www:/usr/share/nginx/html

View file

@ -1,7 +1,7 @@
FROM mhart/alpine-node:8.9.4 as build FROM mhart/alpine-node:8.9.4 as build
RUN npm install -g mustache
COPY . /build COPY . /build
WORKDIR /build WORKDIR /build
RUN npm i -g mustache && npm i
RUN node clean_events.js RUN node clean_events.js
RUN mustache upcoming_events.json index.mustache > index.html RUN mustache upcoming_events.json index.mustache > index.html
RUN mustache past_events.json index.mustache > past.html RUN mustache past_events.json index.mustache > past.html

View file

@ -1,2 +0,0 @@
docker build -t lucj/sophia.events .
docker push lucj/sophia.events

BIN
www/images/cncf-sophia.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

164
www/index.html Normal file
View file

@ -0,0 +1,164 @@
<!DOCTYPE html>
<html>
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113065209-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-113065209-1');
</script>
<meta charset="UTF-8">
<title>TechEvents@Sophia</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100i,300,400,500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Allura" rel="stylesheet">
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<menu>
<ul id="nav">
<li><a href="./index.html">Upcoming</a></li>
<li><a href="./past.html">Past</a></li>
<li><a href="https://github.com/lucj/sophia.events/issues/new" target="_blank">Submit an event (via GitHub)</a></li>
</ul>
</menu>
<header>
<div class="container text-center">
<h1>Technical events in #SophiaAntipolis</h1>
<p>...in one single place</p>
</div>
</header>
<section class="timeline">
<div class="container">
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/telecomvalley-csc.png" />
<h2></h2>
<div class="date">06/02 à 12h</div>
<p>Cloud, virtualisation, microservices, conteneurs… quelles sont les bonnes pratiques de sécurité ? par <b>Serge HARTMANN</b> de <b>ACP Qualife</b></p>
<a class="bnt-more" href="http://telecom-valley.fr/6-fevrier-commission-securite-cloud">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/rivierajug.png" />
<h2></h2>
<div class="date">06/02 à 18h</div>
<p>Présentation de la base de données <b>Hazelcast</b> par <b>Neil Stevenson</b></p>
<a class="bnt-more" href="http://rivierajug.org/xwiki/bin/view/Main/201802-hazelcast">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/telecomvalley-cos.png" />
<h2></h2>
<div class="date">20/02 à 12h</div>
<p>Présentation de <b>Open Source Business Diagnostic</b> par <b>Jaime Arredondo</b> (BoldAndOpen.com)</p>
<a class="bnt-more" href="javascript:void(0);">A venir...</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<h2>Développement Mobile Côte-d'Azur</h2>
<div class="date">21/02 à 18h30</div>
<p>#21: Reactive programming</p>
<a class="bnt-more" href="https://www.meetup.com/fr-FR/Developpement-Mobile-Android-iOS-Cote-d-Azur/events/gszvcpyxdbcc/">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/google.png" />
<h2>Google Hash Code 2018</h2>
<div class="date">01/03 à 18h</div>
<p>Comme tous les ans, Google organise le Hash Code, une compétition de programmation en équipe pour résoudre un problème dingénierie de la vie réelle de Google</p>
<a class="bnt-more" href="https://www.meetup.com/fr-FR/GDGNice/events/245187635/">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/telecomvalley-cos.png" />
<h2></h2>
<div class="date">15/03 à 12h</div>
<p>Introduction à la programmation fonctionnelle par <b>Yann Esposito</b>. Attention, <b>Haskell</b> au programme...</p>
<a class="bnt-more" href="javascript:void(0);">A venir...</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<h2>Développement Mobile Côte-d'Azur</h2>
<div class="date">28/03 à 18h30</div>
<p>#22</p>
<a class="bnt-more" href="javascript:void(0);">A venir...</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/telecomvalley-cos.png" />
<h2></h2>
<div class="date">12/04 à 12h</div>
<p><b>Rémy Coutable</b> de GitLab viendra nous présenter <b>Gitlab-CI</b></p>
<a class="bnt-more" href="javascript:void(0);">A venir...</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/rivieradev.png" />
<h2></h2>
<div class="date">Du 16 au 18/05</div>
<p><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é ...</p>
<a class="bnt-more" href="http://rivieradev.fr">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/sophiaconf2018.png" />
<h2></h2>
<div class="date">Du 2 au 5/07</div>
<p>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 !</p>
<a class="bnt-more" href="http://telecom-valley.fr/sophiaconf-2018-appel-a-orateurs/">More</a>
</div>
</div>
</div>
</section>
<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src='https://cdn.jsdelivr.net/scrollreveal.js/3.3.1/scrollreveal.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>

94
www/past.html Normal file
View file

@ -0,0 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-113065209-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-113065209-1');
</script>
<meta charset="UTF-8">
<title>TechEvents@Sophia</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100i,300,400,500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Allura" rel="stylesheet">
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<menu>
<ul id="nav">
<li><a href="./index.html">Upcoming</a></li>
<li><a href="./past.html">Past</a></li>
<li><a href="https://github.com/lucj/sophia.events/issues/new" target="_blank">Submit an event (via GitHub)</a></li>
</ul>
</menu>
<header>
<div class="container text-center">
<h1>Technical events in #SophiaAntipolis</h1>
<p>...in one single place</p>
</div>
</header>
<section class="timeline">
<div class="container">
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/cncf-sophia.png" />
<h2></h2>
<div class="date">29/01 à 17h30</div>
<p>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</p>
<a class="bnt-more" href="https://www.meetup.com/fr-FR/CNCF-Cloud-Native-Computing-Sophia-Antipolis/events/246424155/">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/telecomvalley-cos.png" />
<h2></h2>
<div class="date">25/01 à 12h</div>
<p>Retour d'expérience sur l'utilisation de <b>Kafka</b> par <b>Sébastien Alegret</b> de GreenCom Network</p>
<a class="bnt-more" href="http://telecom-valley.fr/25-janvier-commission-open-source/">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/hashicorp.png" />
<h2>Hashicorp User Group #2</h2>
<div class="date">23/01 à 18h</div>
<p>Thomas Sarboni</b> fera une introduction à <b>Terraform</b>, <b>David Calvert</b> nous présentera <b>Vault</b></p>
<a class="bnt-more" href="https://www.meetup.com/fr-FR/Sophia-Antipolis-HashiCorp-User-Group/events/246742297/">More</a>
</div>
</div>
<div class="timeline-item">
<div class="timeline-img"></div>
<div class="timeline-content">
<img class="logo" src="./images/docker.png" />
<h2>Meetup Docker / RivieraJug</h2>
<div class="date">18/01 à 18h</div>
<p>Anthony Lapenna</b> viendra nous présenter <b>Portainer</b> pour gérez vos environnements Docker en toute simplicité</p></p>
<a class="bnt-more" href="https://www.meetup.com/fr-FR/Docker-Nice/events/245650434/">More</a>
</div>
</div>
</div>
</section>
<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src='https://cdn.jsdelivr.net/scrollreveal.js/3.3.1/scrollreveal.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>

14
www/rss.js Normal file
View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MakeUseOf RSS Feed</title>
<link>//sophia.events/</link>
<description>Upcoming technical events in Sophia-Antipolis</description>
<item>
<title>Entry Title</title>
<link>Link to the entry</link>
<guid>http://example.com/item/123</guid>
<pubDate>Sat, 9 Jan 2010 16:23:41 GMT</pubDate>
<description>[CDATA[ This is the description. ]]</description>
</item>
</channel>

View file

@ -1,4 +0,0 @@
docker image build -t test.sophia.events .
ID=$(docker run -d -p 80 test.sophia.events)
PORT=$(docker inspect --format '{{ (index (index .NetworkSettings.Ports "80/tcp") 0).HostPort }}' $ID)
echo "=> web site available on http://localhost:$PORT"