Skip to content
Snippets Groups Projects
Commit cb24c75e authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'docker-system' into 'develop'

Docker system

See merge request R3/school/courses!57
parents 71a30821 42863c29
No related branches found
No related tags found
No related merge requests found
...@@ -2,68 +2,4 @@ ...@@ -2,68 +2,4 @@
This repository contains all presentations related to R3. This repository contains all presentations related to R3.
## Prerequisites Detailed instructions are here: https://git-r3lab.uni.lu/R3/outreach/templates/presentation
\ No newline at end of file
In order to use the slide deck, you must have:
- **git**: For convenience, have your SSH key configured on git-r3lab. [Here](https://docs.gitlab.com/ee/gitlab-basics/create-your-ssh-keys.html) is how to do it.
- **git-lfs**: Installation instructions are [here](https://help.github.com/en/articles/installing-git-large-file-storage)
- **Python 3**: It is recommend to use a virtual environment. Information on how to create a virtual environment is [here](https://virtualenvwrapper.readthedocs.io/en/latest/).
- **yarn**: Instructions are [here](https://yarnpkg.com/lang/en/docs/install)
## How to get started
- Fork this repository
- Clone your fork
```bash
$ git clone --recurse-submodules ssh://git@git-r3lab-server.uni.lu:8022/<yourUsername>/presentations-internal.git
```
- If the `--recurse-submodules` flag has been omitted, run this command to check for the missing modules and update them:
```bash
$ git submodule update --init --recursive
```
- Open a terminal and work on your presentation:
```bash
$ cd presentations-internal
$ pip install .
$ contribute --date="YYYY-MM-DD" --name="yourAwesomeTitle"
```
## <img src="https://webdav-r3lab.uni.lu/public/R3lab/logos/warning.png" height="20px" width="20px"> Tips
- Please create a branch from `develop` before starting to work on your presentation. You could name it `YYYY-MM-DD_yourAwesomeTitle`.
- If you are done with making changes to your presentation, push them to your fork and open a merge request against the `develop` branch.
## <img src="https://webdav-r3lab.uni.lu/public/R3lab/logos/warning.png" height="20px" width="20px">Solving the error: `Fatal error: Unable to find local grunt.`
If you get a fatal error complaining about your local grunt installation, please make sure that you have add the `--recurse-submodules` flag when cloning, or that you ran the `git submodule update --init --recursive` command from within
the `presentations-internal` directory.
Please also make sure that you run the `contribute` command from the root of the `presentations-internal` directory.
## How to continue working on a presentation
For resuming your work on a presentation, you can either run the same contribute command:</br>
```
$ contribute --date="YYYY-MM-DD" --name="yourAwesomeTitle"
```
or you can navigate to your presentation directory and start `grunt` server:
```
$ cd YYYY/yourAwesomeTitle/
$ grunt server
```
## Adding a new slide/slides
Create a Markdown file with your slide(s) in `YYYY-MM-DD_yourAwesomeTitle/slides` and place it into `list.md` file at desired position:
```
[
{ "filename": "index.md" },
{ "filename": "structure.md" },
{ "filename": "myNewAwesomeSlide.md" },
{ "filename": "thanks.md" }
]
```
...@@ -20,6 +20,10 @@ def main(date, name): ...@@ -20,6 +20,10 @@ def main(date, name):
# get the root directory # get the root directory
rootDir = os.getcwd() rootDir = os.getcwd()
# create a root directory if not existing
if not os.path.exists(mainDir):
os.mkdir(mainDir)
# generate the full name of the presentation # generate the full name of the presentation
fullName = date + "_" + name fullName = date + "_" + name
......
#!/bin/bash
# set the variables
dockerImg="git-r3lab.uni.lu:4567/r3/docker/nodejs-yarn-grunt"
dockerPort="9000"
helpFunction()
{
echo ""
echo "Usage: $0 -d parameterDate -n parameterName"
echo -e "\t-d Data of presentation"
echo -e "\t-n Name of presentation"
exit 1 # Exit script after printing help
}
while getopts "d:n:" opt
do
case "$opt" in
d ) parameterDate="$OPTARG" ;;
n ) parameterName="$OPTARG" ;;
? ) helpFunction ;; # Print helpFunction in case parameter is non-existent
esac
done
# Print helpFunction in case parameters are empty
if [ -z "$parameterDate" ] || [ -z "$parameterName" ]
then
echo "Some or all of the parameters are empty";
helpFunction
fi
# launch the docker file
cmd="python contribute.py --date=\"$parameterDate\" --name=\"$parameterName\""
docker run -p $dockerPort:$dockerPort -it -v $(pwd)/:/presentation $dockerImg /bin/bash -c "$cmd"
...@@ -36,9 +36,9 @@ module.exports = (grunt) -> ...@@ -36,9 +36,9 @@ module.exports = (grunt) ->
port: 9000 port: 9000
# Change hostname to '0.0.0.0' to access # Change hostname to '0.0.0.0' to access
# the server from outside. # the server from outside.
hostname: 'localhost' #hostname: '0.0.0.0'
base: '.' base: '.'
open: true #open: true
livereload: true livereload: true
jshint: jshint:
......
theme @ 8b3401b8
Subproject commit 3f950f06b72824f97b486a47d54754eeed0f0faf Subproject commit 8b3401b863d08b5a676bfa327dba915a14d41e70
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment