瀏覽代碼

Fix Web Mount

Benjamin Harris 2 月之前
父節點
當前提交
5494e79769
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      docker-compose.yml
  2. 1 1
      web/councils.php
  3. 1 1
      web/index.php

+ 1 - 1
docker-compose.yml

@@ -67,7 +67,7 @@ services:
     image: councils-web:latest
     image: councils-web:latest
     volumes:
     volumes:
       - ./web:/var/www/html:ro
       - ./web:/var/www/html:ro
-      - ./config:/var/www/html/config:ro
+      - ./config:/var/www/config:ro
       - ./downloads:/srv/files:ro
       - ./downloads:/srv/files:ro
       - ./web/000-files.conf:/etc/apache2/conf-enabled/000-files.conf:ro
       - ./web/000-files.conf:/etc/apache2/conf-enabled/000-files.conf:ro
     ports:
     ports:

+ 1 - 1
web/councils.php

@@ -20,7 +20,7 @@ function h($s): string { return htmlspecialchars((string)$s, ENT_QUOTES, 'UTF-8'
 
 
 // ---- Council config (name + source URL) ----
 // ---- Council config (name + source URL) ----
 $councilConfig = [];
 $councilConfig = [];
-$cfgFile = __DIR__ . '/config/councils.json';
+$cfgFile = '/var/www/config/councils.json';
 if (is_readable($cfgFile)) {
 if (is_readable($cfgFile)) {
     $decoded = json_decode(file_get_contents($cfgFile), true);
     $decoded = json_decode(file_get_contents($cfgFile), true);
     if (is_array($decoded)) $councilConfig = $decoded;
     if (is_array($decoded)) $councilConfig = $decoded;

+ 1 - 1
web/index.php

@@ -18,7 +18,7 @@ $pdo = new PDO($dsn, $DB_USER, $DB_PASS, [
 
 
 // ---- Council config (name + source URL) ----
 // ---- Council config (name + source URL) ----
 $councilConfig = [];
 $councilConfig = [];
-$cfgFile = __DIR__ . '/config/councils.json';
+$cfgFile = '/var/www/config/councils.json';
 if (is_readable($cfgFile)) {
 if (is_readable($cfgFile)) {
     $decoded = json_decode(file_get_contents($cfgFile), true);
     $decoded = json_decode(file_get_contents($cfgFile), true);
     if (is_array($decoded)) $councilConfig = $decoded;
     if (is_array($decoded)) $councilConfig = $decoded;