From 1024bd669c3bb2fe9128bff23ed6ca42c48c0bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Menrath?= Date: Wed, 19 Jun 2024 12:48:05 +0200 Subject: [PATCH] wip --- .gitignore | 3 ++- docker-compose.yml | 32 +++++++++++++++++++++++--------- gancio/.gitkeep | 0 gancio/data/config.json | 41 +++++++++++++++++++++++++++++++++++++++++ nginx/nginx.conf | 32 +++++++++++++++++++++++++++++++- wordpress/Dockerfile | 2 +- 6 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 gancio/.gitkeep create mode 100644 gancio/data/config.json diff --git a/.gitignore b/.gitignore index 63c8c9e..706e73b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ certs wordpress/wordpress -mobilizon/mobilizon \ No newline at end of file +mobilizon/mobilizon +gancio/data/gancio.sqlite diff --git a/docker-compose.yml b/docker-compose.yml index 439695b..4059a67 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.9" - services: nginx: image: nginx:latest @@ -13,11 +11,13 @@ services: depends_on: - wordpress - mobilizon + # - gancio networks: default: aliases: - wp.lan - mz.lan + # - ga.lan postgres: container_name: mobilizon_db @@ -41,9 +41,8 @@ services: dockerfile: Dockerfile volumes: - "./mobilizon/mobilizon:/app" - - "./mobilizon/dev.exs:/app/config/dev.exs" - - "./certs/:/app/priv/certs/:ro" - - "/etc/ssl/certs/ca-certificates.crt:/app/priv/ca-bundle.crt:ro" + # - "./mobilizon/dev.exs:/app/config/dev.exs" + - "/etc/ssl/certs:/etc/ssl/certs:ro" depends_on: - postgres environment: @@ -51,8 +50,8 @@ services: DOCKER: "true" MOBILIZON_INSTANCE_NAME: Mobilizon Local MOBILIZON_INSTANCE_HOST: mz.lan - MOBILIZON_INSTANCE_HOST_PORT: 443 - MOBILIZON_INSTANCE_PORT: 443 + MOBILIZON_INSTANCE_HOST_PORT: 4000 + MOBILIZON_INSTANCE_PORT: 4000 MOBILIZON_INSTANCE_EMAIL: noreply@mobilizon.me MOBILIZON_INSTANCE_REGISTRATIONS_OPEN: "true" MOBILIZON_DATABASE_PASSWORD: mobilizon @@ -61,14 +60,29 @@ services: MOBILIZON_DATABASE_HOST: postgres MOBILIZON_DATABASE_PORT: 5432 VITE_HOST: 0.0.0.0 - MOBILIZON_CA_CERT_PATH: "/app/priv/ca-bundle.crt" + MOBILIZON_CA_CERT_PATH: "/etc/ssl/certs/ca-certificates.crt" command: sh -c "mix phx.server" expose: - - "443" + # - "443" - "4000" ports: - "5173:5173" + # gancio: + # restart: always + # image: cisti/gancio + # container_name: gancio + # environment: + # - PATH=$PATH:/home/node/.yarn/bin + # - GANCIO_DATA=/home/node/data + # - NODE_ENV=development + # - GANCIO_DB_DIALECT=sqlite + # - GANCIO_DB_STORAGE=./gancio.sqlite + # volumes: + # - ./gancio/data:/home/node/data + # ports: + # - "13120:13120" + wordpress: build: context: ./wordpress diff --git a/gancio/.gitkeep b/gancio/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/gancio/data/config.json b/gancio/data/config.json new file mode 100644 index 0000000..a2ed406 --- /dev/null +++ b/gancio/data/config.json @@ -0,0 +1,41 @@ +{ + "baseurl": "https://ga.lan", + "hostname": "ga.lan", + "server": { + "host": "0.0.0.0", + "port": 13120 + }, + "log_level": "debug", + "log_path": "/home/node/data/logs", + "db": { + "dialect": "sqlite", + "storage": "/home/node/data/gancio.sqlite", + "logging": false, + "dialectOptions": { + "autoJsonMap": true + }, + "retry": { + "match": [ + null, + null, + null, + {}, + {} + ], + "max": 15 + } + }, + "user_locale": "/home/node/data/user_locale", + "upload_path": "/home/node/data/uploads", + "proxy": { + "protocol": "", + "hostname": "", + "host": "", + "port": "", + "auth": { + "username": "", + "password": "" + }, + "headers": {} + } +} \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 47928a2..bf27ddc 100755 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -63,7 +63,37 @@ http { proxy_set_header X-Forwarded-Proto $scheme; location / { - proxy_pass "https://mobilizon"; + proxy_pass "http://mobilizon:4000"; } } + + server { + server_name ga.lan; + listen 80; + + return 301 https://$server_name$request_uri; + } + + # server { + # server_name ga.lan; + # listen 443 ssl; + # http2 on; + + # ssl_certificate /etc/nginx/certs/lan.pem; + # ssl_certificate_key /etc/nginx/certs/lan-key.pem; + + # client_max_body_size 16m; + + # proxy_http_version 1.1; + # proxy_set_header Upgrade $http_upgrade; + # proxy_set_header Connection "upgrade"; + # proxy_set_header Host $http_host; + # proxy_set_header X-Real-IP $remote_addr; + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header X-Forwarded-Proto $scheme; + + # location / { + # proxy_pass "http://gancio:13120"; + # } + # } } diff --git a/wordpress/Dockerfile b/wordpress/Dockerfile index a5aaf0c..fc6ee0c 100755 --- a/wordpress/Dockerfile +++ b/wordpress/Dockerfile @@ -1,4 +1,4 @@ -FROM wordpress:php8.0 +FROM wordpress:6.5.0-php8.2 # Install packages under Debian RUN apt-get update && \