-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored to run with libpqxx version 7.x in addition to 6.x.
The `configure` script first looks for an installed version 7 before falling back to version 6. - Allow more general use of Vagrant provisioning scripts in other environments, e.g. Qemu. See the `bootstrap.sh` header for brief instructions. - Update Vagrant scripts to use PostgreSQL 15 where available - Updated to use OpenLayers 9.1.0, Bootstrap 5.3.3 and proj4js 2.11.0. - Fix fetching inactive shared tracks. - Only fetch active user shares when fetching nicknames for itinerary map. - Fix forbidden resources to be handled as forbidden instead of not authorized. - Fix read-only viewing of itinerary waypoint. - Handle invalid position/location when editing waypoints. - Fix previously input values lost from itinerary waypoint when invalid position submitted. - Fix missing validation rules for latitude and longitude values of itinerary waypoint.
- Loading branch information
Showing
140 changed files
with
3,145 additions
and
2,542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# -*- mode: dockerfile; -*- vim: set ft=dockerfile: | ||
FROM debian:trixie-20240513 AS build | ||
RUN groupadd --gid 1000 trip \ | ||
&& useradd --uid 1000 --gid trip --shell /bin/bash --create-home trip | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
procps locales coreutils tar xz-utils ca-certificates tzdata \ | ||
make g++ gawk \ | ||
libboost-locale-dev libpqxx-dev libpugixml-dev libyaml-cpp-dev \ | ||
nlohmann-json3-dev uuid-dev cairomm-1.0-dev libgdal-dev libcmark-dev \ | ||
texlive texinfo \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
locale-gen && \ | ||
export LC_ALL=en_GB.utf8 && \ | ||
localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 && \ | ||
update-locale LANG LANGUAGE && \ | ||
ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \ | ||
dpkg-reconfigure tzdata --frontend=noninteractive | ||
ENV LANG en_GB.utf8 | ||
ARG TRIP_SERVER_VERSION=@PACKAGE_VERSION@ | ||
ARG TRIP_SERVER_FILENAME=trip-${TRIP_SERVER_VERSION}.tar.gz | ||
RUN chgrp trip /usr/local/src && \ | ||
chmod g+w /usr/local/src | ||
|
||
USER trip | ||
WORKDIR /usr/local/src | ||
# ADD --chown=trip:trip https://www.fdsd.co.uk/trip-server-2/download/${TRIP_SERVER_FILENAME} . | ||
# ARG TRIP_SERVER_SHA256=49fec7ba5d0df588594eee4e39c7afeaf5a61b2467f3c8ee62e94541eaddc3ad | ||
# RUN echo "$TRIP_SERVER_SHA256 *${TRIP_SERVER_FILENAME}" | sha256sum -c - | ||
|
||
COPY ./${TRIP_SERVER_FILENAME} . | ||
RUN tar -xf $TRIP_SERVER_FILENAME | ||
WORKDIR "/usr/local/src/trip-${TRIP_SERVER_VERSION}" | ||
|
||
RUN ./configure --enable-cairo && make check | ||
RUN make html pdf | ||
|
||
USER root | ||
RUN make install install-html install-pdf | ||
|
||
WORKDIR /usr/local/etc | ||
|
||
FROM debian:trixie-20240513 | ||
LABEL uk.co.fdsd.tripserver.version="@PACKAGE_VERSION@" | ||
|
||
RUN groupadd --gid 1000 trip \ | ||
&& useradd --uid 1000 --gid trip --shell /bin/bash --create-home trip | ||
|
||
RUN apt-get update \ | ||
&& apt-get full-upgrade --yes --allow-change-held-packages \ | ||
&& apt-get install -y --no-install-recommends \ | ||
locales tzdata \ | ||
libboost-locale1.74.0 libpugixml1v5 libyaml-cpp0.7 \ | ||
uuid libpqxx-6.4 libcairomm-1.0-1v5 libcmark0.30.2 \ | ||
postgresql postgresql-contrib postgis | ||
|
||
RUN sed -i -e 's/# en_GB.UTF-8 UTF-8/en_GB.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
sed -i -e 's/# fr_FR.UTF-8 UTF-8/fr_FR.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
locale-gen && \ | ||
export LC_ALL=en_GB.utf8 && \ | ||
localedef -i en_GB -c -f UTF-8 -A /usr/share/locale/locale.alias en_GB.UTF-8 && \ | ||
update-locale LANG LANGUAGE && \ | ||
ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \ | ||
dpkg-reconfigure tzdata --frontend=noninteractive | ||
ENV LANG en_GB.utf8 | ||
|
||
COPY --from=build /usr/local/bin/ /usr/local/bin/ | ||
COPY --from=build /usr/local/etc/ /usr/local/etc/ | ||
COPY --from=build /usr/local/share/ /usr/local/share/ | ||
|
||
COPY --chmod=755 docker-entrypoint.sh /usr/local/bin/ | ||
|
||
WORKDIR /usr/local/etc | ||
RUN rm -f trip-server.yaml && touch trip-server.yaml && \ | ||
chown trip:trip trip-server.yaml && chmod 0640 trip-server.yaml | ||
|
||
USER trip | ||
|
||
EXPOSE 8080 | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
|
||
CMD ["trip-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.