From b07070a4ac68878582dc0a23323255b56fddecae Mon Sep 17 00:00:00 2001
From: Orestis <orestis.malaspinas@pm.me>
Date: Mon, 2 Jan 2023 17:50:38 +0100
Subject: [PATCH] added docker compose

---
 Makefile           | 13 ++++++++++---
 docker-compose.yml | 18 ++++++++++--------
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 8a66153..0301c64 100644
--- a/Makefile
+++ b/Makefile
@@ -8,14 +8,14 @@ OPTIONS += --filter=pandoc-numbering
 OPTIONS += --filter=pandoc-crossref
 
 PDFOPTIONS = --highlight-style kate
-PDFOPTIONS += --pdf-engine pdflatex
+PDFOPTIONS += --pdf-engine xelatex
 PDFOPTIONS += --number-sections
-PDFOPTIONS += --template=./default.latex
+# PDFOPTIONS += --template=./default.latex
 
 
 HTMLOPTIONS += -t html5
 HTMLOPTIONS += -c css/tufte-css/tufte.css
-HTMLOPTIONS += --self-contained
+HTMLOPTIONS += --standalone
 HTMLOPTIONS += --mathjax=MathJax.js
 
 CLASS_SOURCES := $(sort $(filter-out README.md, $(wildcard *.md)))
@@ -29,6 +29,13 @@ TEX := $(patsubst %.md, %.tex, $(SOURCES))
 
 all:  cours.pdf cours.html
 
+docker: docker-compose.yml
+	docker-compose run cours
+
+docker_clean: docker-compose.yml
+	docker-compose run cours clean
+
+
 debug: $(PDF) $(TEX)
 
 cours.pdf: $(CLASS_SOURCES)
diff --git a/docker-compose.yml b/docker-compose.yml
index a620899..caf9386 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,12 +1,14 @@
 version: "3.3"
 services:
-    pandoc:
+    cours:
         #To use dockerfile : build: . 
-        image: omalaspinas/c_pandoc:latest
-        user: 1000:1000
-        container_name: pandoc
+        image:  omalaspinas/c_pandoc:latest
+        environment:
+            USER: 1000
+            GROUP: 1000
+        container_name: cours
         volumes:
-            - .:/app
-        working_dir: /app
-
-
+            - ./:/data
+        entrypoint: ["make"]
+        working_dir: /data
+        # user: "$(id -u):$(id -g)"
-- 
GitLab