From 18da977b323df714bf89fa275a92469bb366f217 Mon Sep 17 00:00:00 2001 From: gri38 Date: Sun, 3 Apr 2022 12:01:34 +0200 Subject: [PATCH] A working commit on all projects --- .gitignore | 4 +++- .vscode/settings.json | 2 ++ clone-for-dev.sh | 2 +- docker-compose-test.yml | 25 +++++++++++++++++++++ docker-compose.yml | 48 ++++++++++++++++++++++++++++++++++------ workspace.code-workspace | 8 +++++++ 6 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 docker-compose-test.yml diff --git a/.gitignore b/.gitignore index 8c9f8ed..5326149 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ django-joplin-vieweb/ -joplin-terminal-xapi/ \ No newline at end of file +joplin-terminal-xapi/ +joplin-vieweb-certbot/ +joplin-vieweb-nginx/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 119f178..5fcd8ea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,7 @@ "files.exclude": { "django-joplin-vieweb": true, "joplin-terminal-xapi": true, + "joplin-vieweb-certbot": true, + "joplin-vieweb-nginx": true, }, } \ No newline at end of file diff --git a/clone-for-dev.sh b/clone-for-dev.sh index 6182e6e..2c12070 100755 --- a/clone-for-dev.sh +++ b/clone-for-dev.sh @@ -1,5 +1,5 @@ #/bin/sh -for project in joplin-terminal-xapi django-joplin-vieweb; do +for project in joplin-terminal-xapi django-joplin-vieweb joplin-vieweb-nginx joplin-vieweb-certbot; do git clone git@github.com:joplin-vieweb/${project}.git done diff --git a/docker-compose-test.yml b/docker-compose-test.yml new file mode 100644 index 0000000..b3c6b94 --- /dev/null +++ b/docker-compose-test.yml @@ -0,0 +1,25 @@ +version: '3.4' + +services: + certbot: + image: certbot/certbot:latest + depends_on: + - joplin-vieweb-nginx + volumes: + - certbot_www:/var/www/certbot/:rw + - certbot_conf:/etc/letsencrypt/:rw + + joplin-vieweb-nginx: + build: ./joplin-vieweb-nginx + ports: + - 80:80 + - 443:443 + environment: + - server_name=guillot.fr.nf + volumes: + - certbot_www:/var/www/certbot/:ro + - certbot_conf:/etc/letsencrypt/:ro + +volumes: + certbot_www: + certbot_conf: diff --git a/docker-compose.yml b/docker-compose.yml index 33d1ba6..f5c191f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,37 +1,71 @@ version: '3.4' +x-common-variables: &common-variables + DOMAIN: your_domain.com + DOMAIN_IP: 12.34.56.78 + CERT_MAIL: webmaster@your_domain.com + services: django-joplin-vieweb: # image: django-joplin-vieweb build: ./django-joplin-vieweb # command: ["/bin/sh"] - # stdin_open: true - # tty: true + #stdin_open: true + #tty: true depends_on: - joplin-terminal-xapi - ports: - - 80:80 + environment: + <<: *common-variables restart: unless-stopped volumes: - joplin:/root/.config/joplin:ro - joplin-vieweb:/root/.config/joplin-vieweb + - certbot_www:/var/www/certbot/:ro networks: - joplin-net joplin-terminal-xapi: image: joplin-terminal-xapi - # ports: - # - "8080:8080" - # - "8081:8081" restart: unless-stopped volumes: - joplin:/root/.config/joplin networks: - joplin-net + joplin-vieweb-certbot: + build: ./joplin-vieweb-certbot + environment: + <<: *common-variables + # command: ["/bin/bash"] + stdin_open: true + tty: true + depends_on: + - joplin-vieweb-nginx + volumes: + - certbot_www:/var/www/certbot/:rw + - certbot_conf:/etc/letsencrypt/:rw + + joplin-vieweb-nginx: + build: ./joplin-vieweb-nginx + # command: ["/bin/sh"] + # stdin_open: true + # tty: true + ports: + - 80:80 + - 443:443 + environment: + <<: *common-variables + volumes: + - certbot_www:/var/www/certbot/:ro + - certbot_conf:/etc/letsencrypt/:ro + networks: + - joplin-net + volumes: joplin: joplin-vieweb: + certbot_www: + certbot_conf: networks: joplin-net: {} diff --git a/workspace.code-workspace b/workspace.code-workspace index a7d3f9b..d0cf0d5 100644 --- a/workspace.code-workspace +++ b/workspace.code-workspace @@ -8,6 +8,14 @@ "name": "joplin-terminal-xapi", "path": "joplin-terminal-xapi" }, + { + "name": "joplin-vieweb-certbot", + "path": "joplin-vieweb-certbot" + }, + { + "name": "joplin-vieweb-nginx", + "path": "joplin-vieweb-nginx" + }, { "name": "jolpin-vieweb", "path": "."