From da2a1d64ef8883732d320d0f41c1ff3039de7a47 Mon Sep 17 00:00:00 2001 From: Akira Date: Mon, 25 Aug 2025 05:33:39 +0900 Subject: [PATCH] Try to upgrade gdal --- Dockerfile.gdal | 57 ++++++++++++++----------------- rog/urls.py | 3 +- supervisor/html/index.html | 2 +- supervisor/html/ranking.html | 2 +- 外部システムAPI仕様書.md | 2 +- 5 files changed, 30 insertions(+), 36 deletions(-) diff --git a/Dockerfile.gdal b/Dockerfile.gdal index 262aec7..1b747f3 100644 --- a/Dockerfile.gdal +++ b/Dockerfile.gdal @@ -1,5 +1,6 @@ # FROM python:3.9.9-slim-buster -FROM osgeo/gdal:ubuntu-small-3.4.0 +# FROM osgeo/gdal:ubuntu-small-3.4.0 +FROM ubuntu:22.04 WORKDIR /app @@ -10,42 +11,36 @@ LABEL description="Development image for the Rogaining JP" ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1 -ARG TZ Asia/Tokyo \ - DEBIAN_FRONTEND=noninteractive +ARG TZ=Asia/Tokyo +ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update -y - -# Install GDAL dependencies -RUN apt-get install -y libgdal-dev g++ --no-install-recommends && \ - apt-get clean -y +# Install system dependencies including GDAL +RUN apt-get update -y && \ + apt-get install -y \ + gdal-bin \ + libgdal-dev \ + python3-gdal \ + python3 \ + python3-pip \ + g++ \ + gcc \ + postgresql-client \ + libpq-dev \ + netcat \ + postgresql \ + binutils \ + libproj-dev \ + libcurl4-openssl-dev \ + libssl-dev \ + libspatialindex-dev \ + --no-install-recommends && \ + apt-get clean -y && \ + rm -rf /var/lib/apt/lists/* # Update C env vars so compiler can find gdal ENV CPLUS_INCLUDE_PATH=/usr/include/gdal ENV C_INCLUDE_PATH=/usr/include/gdal -RUN apt-get update \ - && apt-get -y install netcat gcc postgresql \ - && apt-get clean - -RUN apt-get update \ - && apt-get install -y binutils libproj-dev gdal-bin python3-gdal - -RUN apt-get install -y libcurl4-openssl-dev libssl-dev - -RUN apt-get install -y libspatialindex-dev - -RUN apt-get install -y python3 - -RUN apt-get update && apt-get install -y \ - python3-pip - -# libpqをアップグレード Added by Akira 2025-5-13 -RUN apt-get update && apt-get install -y \ - postgresql-client \ - libpq-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - # ベースイメージの更新とパッケージのインストール RUN apt-get update && \ apt-get install -y \ diff --git a/rog/urls.py b/rog/urls.py index eaf98e6..423affd 100755 --- a/rog/urls.py +++ b/rog/urls.py @@ -107,7 +107,6 @@ urlpatterns += [ path('categories//', NewCategoryListView.as_view(), name='category-list'), path('categories/', NewCategoryListView.as_view(), name='category-list'), - path('new-events/', NewEvent2ListView.as_view(), name='new-event-list'), path('members//user/', MemberUserDetailView.as_view(), name='member-user-detail'), path('teams//members-with-user/', TeamMembersWithUserView.as_view(), name='team-members-with-user'), @@ -127,7 +126,7 @@ urlpatterns += [ path('users//last-goal/', UserLastGoalTimeView.as_view(), name='user-last-goal-time'), path('teams//entries/', TeamEntriesView.as_view(), name='team-entries'), #path('admin/newevent2/', NewEvent2AdminView.as_view(), name='newevent2-admin'), - path('newevent2-list/', views.NewEvent2ListView.as_view(), name='newevent2-list'), + path('new-events/', views.NewEvent2ListView.as_view(), name='new-events'), #path('admin/newevent2/csv-upload/', NewEvent2Admin.as_view({'get': 'csv_upload_view', 'post': 'csv_upload_view'}), name='rog_newevent2_csv-upload'), #path('admin/', admin.site.urls), diff --git a/supervisor/html/index.html b/supervisor/html/index.html index b433efc..9e3e7b6 100755 --- a/supervisor/html/index.html +++ b/supervisor/html/index.html @@ -850,7 +850,7 @@ async function loadEventCodes() { console.log('loadEventCodes called'); try { - const apiUrl = `${API_BASE_URL}/events/`; + const apiUrl = `${API_BASE_URL}/new-events/`; console.log('Fetching events from URL:', apiUrl); const response = await fetch(apiUrl, { diff --git a/supervisor/html/ranking.html b/supervisor/html/ranking.html index 552386c..509b081 100644 --- a/supervisor/html/ranking.html +++ b/supervisor/html/ranking.html @@ -122,7 +122,7 @@ // イベント一覧の取得と表示 async function loadEvents() { try { - const response = await fetch(`${API_BASE_URL}/api/newevent2/`, { + const response = await fetch(`${API_BASE_URL}/api/new-events/`, { method: 'GET', headers: { 'Accept': 'application/json', diff --git a/外部システムAPI仕様書.md b/外部システムAPI仕様書.md index a7faae3..5fbd516 100644 --- a/外部システムAPI仕様書.md +++ b/外部システムAPI仕様書.md @@ -258,7 +258,7 @@ Content-Type: application/json ### 3.2 イベント一覧取得 参加可能なイベントの一覧を取得します。 -**エンドポイント**: `GET /newevent2-list/` +**エンドポイント**: `GET /new-events/` **レスポンス(成功時)**: ```json