From 2dbcb0e78471da40015ee037a119eed77908bd43 Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 00:57:46 +0200 Subject: [PATCH 01/15] Added docker-compose file. Removed unnecessary folders (the base + server dockerfiles were merged). --- .gitignore | 2 ++ perforce-base/Dockerfile => Dockerfile | 11 +++++------ docker-compose.yml | 23 +++++++++++++++++++++++ perforce-base/README.md | 5 ----- perforce-server/Dockerfile | 16 ---------------- perforce-server/README.md | 21 --------------------- perforce-server/run.sh => run.sh | 0 7 files changed, 30 insertions(+), 48 deletions(-) create mode 100644 .gitignore rename perforce-base/Dockerfile => Dockerfile (56%) create mode 100644 docker-compose.yml delete mode 100644 perforce-base/README.md delete mode 100644 perforce-server/Dockerfile delete mode 100644 perforce-server/README.md rename perforce-server/run.sh => run.sh (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..673b29a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +**/.env +**/.directory diff --git a/perforce-base/Dockerfile b/Dockerfile similarity index 56% rename from perforce-base/Dockerfile rename to Dockerfile index 2331b56..3669348 100644 --- a/perforce-base/Dockerfile +++ b/Dockerfile @@ -1,14 +1,13 @@ FROM ubuntu:18.04 -LABEL maintainer="George Jiglau " ENV DEBIAN_FRONTEND noninteractive -# Update package list and install wget -RUN apt-get update && apt-get install -y wget gnupg2 && \ - # Get perforce packages +RUN apt-get update && apt-get install -y wget gnupg2 curl && \ wget -q http://package.perforce.com/perforce.pubkey -O - | apt-key add - && \ echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && \ - # clean up the layer. - rm -rf /var/log/* \ + apt-get install -y helix-p4d=2019.2-1942501~bionic && \ + rm -rf /var/log/* && \ rm -rf /var/lib/apt/lists/* +COPY run.sh / +CMD ["/run.sh"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..36272af --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: "3" +services: + perforce: + restart: always + container_name: "perforce-server" + environment: + DEBIAN_FRONTEND: noninteractive + P4USER: ${P4USER:-p4admin} + P4PORT: ${P4PORT:-ssl:1666} + P4PASSWD: ${P4PASSWD:-PLEASEdontForgetTOsetASTRONGpw337723817290} + SERVER_NAME: ${SERVER_NAME:-p4dsrv} + build: + context: . + dockerfile: Dockerfile + volumes: + - /mnt/dockervolumes/perforce:/opt/perforce + ports: + - "${P4PORTNUM:-1666}:${P4PORTNUM:-1666}" + networks: + - perforce-network +networks: + perforce-network: + driver: bridge \ No newline at end of file diff --git a/perforce-base/README.md b/perforce-base/README.md deleted file mode 100644 index 996b9ba..0000000 --- a/perforce-base/README.md +++ /dev/null @@ -1,5 +0,0 @@ -perforce-base -============= -[![Docker Build Status](http://hubstatus.container42.com/noonien/perforce-base)](https://registry.hub.docker.com/u/noonien/perforce-base) - -This docker image is based on `ubuntu:18.04` and contains the [Perforce APT repositories](http://package.perforce.com/). diff --git a/perforce-server/Dockerfile b/perforce-server/Dockerfile deleted file mode 100644 index a2d917e..0000000 --- a/perforce-server/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM noonien/perforce-base -LABEL maintainer="George Jiglau " - -# Install the perforce server -RUN apt-get update && apt-get install -y helix-p4d=2018.2-1751184~bionic curl && \ - # clean temporary files - rm -rf /var/log/* && \ - rm -rf /var/lib/apt/lists/* - -# Volumes for server roots and triggers -VOLUME /opt/perforce/servers -VOLUME /opt/perforce/triggers - -# Add startup file and run it by default -COPY run.sh / -CMD ["/run.sh"] diff --git a/perforce-server/README.md b/perforce-server/README.md deleted file mode 100644 index 7830098..0000000 --- a/perforce-server/README.md +++ /dev/null @@ -1,21 +0,0 @@ -perforce-server -=============== -[![Docker Build Status](http://hubstatus.container42.com/noonien/perforce-server)](https://registry.hub.docker.com/u/noonien/perforce-server) - -This is a docker image for the [Perforce Helix Server](http://www.perforce.com/). - -Usage ------ - - docker run -e SERVER_NAME=server-name -e P4PASSWD= -p 1666:1666 noonien/perforce-server - -Details -------- -The following environment variables are available: - - - SERVER_NAME - Server name. Required. - - P4PORT - Address on which to listen. Described [here](http://www.perforce.com/perforce/doc.current/manuals/cmdref/P4PORT.html). Defaults to ssl:1666. - - P4USER - Superuser username. Only created when creating a new server. Defaults to p4admin. - - P4PASSWD - Superuser password. Required when creating a new server. - -The path `/opt/perforce/server` is mounted as a volume because that's where the server roots are stored. diff --git a/perforce-server/run.sh b/run.sh similarity index 100% rename from perforce-server/run.sh rename to run.sh From 24ba14b8d69b51d26a9581a69e8ab88696ed8bfb Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:13:31 +0200 Subject: [PATCH 02/15] modified: Dockerfile --- Dockerfile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3669348..a248994 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,6 @@ FROM ubuntu:18.04 -ENV DEBIAN_FRONTEND noninteractive - -RUN apt-get update && apt-get install -y wget gnupg2 curl && \ - wget -q http://package.perforce.com/perforce.pubkey -O - | apt-key add - && \ - echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && \ - apt-get install -y helix-p4d=2019.2-1942501~bionic && \ - rm -rf /var/log/* && \ - rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | sudo apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get install -y helix-p4d=2019.2-1942501~bionic && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* COPY run.sh / CMD ["/run.sh"] \ No newline at end of file From 59a8a88faf9cf98c3dfc2154ddedac95be874dcf Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:14:43 +0200 Subject: [PATCH 03/15] modified: Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a248994..6b68531 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | sudo apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get install -y helix-p4d=2019.2-1942501~bionic && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get install -y helix-p4d=2019.2-1942501~bionic && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* COPY run.sh / CMD ["/run.sh"] \ No newline at end of file From 200a624c4cfa9e94c42d5be91ce7ba6222065e5a Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:16:46 +0200 Subject: [PATCH 04/15] modified: Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6b68531..fa11f49 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get install -y helix-p4d=2019.2-1942501~bionic && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get install -y helix-p4d && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* COPY run.sh / CMD ["/run.sh"] \ No newline at end of file From 4c7edb48832502c7ee5cfd001b484003c26bd656 Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:17:50 +0200 Subject: [PATCH 05/15] modified: Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa11f49..4dbdd7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get install -y helix-p4d && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get update && apt-get install -y helix-p4d && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* COPY run.sh / CMD ["/run.sh"] \ No newline at end of file From dfe286eb44003231f07154d0348372769880f6eb Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:19:22 +0200 Subject: [PATCH 06/15] modified: Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 4dbdd7a..104d533 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND noninteractive + RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get update && apt-get install -y helix-p4d && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* COPY run.sh / From 637ea43c730dc10f257ac46c0743e52c6f0597b5 Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:26:38 +0200 Subject: [PATCH 07/15] modified: Dockerfile --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 104d533..77ec15f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,12 @@ FROM ubuntu:18.04 ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y wget gnupg2 curl apt-utils && wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && apt-get update && apt-get install -y helix-p4d && rm -rf /var/log/* && rm -rf /var/lib/apt/lists/* +RUN apt-get update && \ +apt-get install -y wget gnupg2 curl apt-utils && \ +wget -qO - https://package.perforce.com/perforce.pubkey | apt-key add - && echo 'deb http://package.perforce.com/apt/ubuntu bionic release' > /etc/apt/sources.list.d/perforce.sources.list && \ +apt-get update && apt-get install -y helix-p4d=2019.2-1942501~bionic && \ +rm -rf /var/log/* && \ +rm -rf /var/lib/apt/lists/* COPY run.sh / CMD ["/run.sh"] \ No newline at end of file From 787720b9e73ed7beaed4e606f260711c3c5579e9 Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:28:58 +0200 Subject: [PATCH 08/15] modified: run.sh --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 0a0ba9e..99ee4bb 100755 --- a/run.sh +++ b/run.sh @@ -2,7 +2,7 @@ set -e # Perforce paths -CONFIGURE_SCRIPT=/opt/perforce/sbin/configure-perforce-server.sh +CONFIGURE_SCRIPT=/opt/perforce/sbin/configure-helix-p4d.sh SERVERS_ROOT=/opt/perforce/servers CONFIG_ROOT=/etc/perforce/p4dctl.conf.d From 5d4deed206b0c3ffa65ed0fa9e8882d6f683e4e4 Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:33:22 +0200 Subject: [PATCH 09/15] modified: run.sh --- run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 99ee4bb..ee88e3e 100755 --- a/run.sh +++ b/run.sh @@ -6,7 +6,9 @@ CONFIGURE_SCRIPT=/opt/perforce/sbin/configure-helix-p4d.sh SERVERS_ROOT=/opt/perforce/servers CONFIG_ROOT=/etc/perforce/p4dctl.conf.d -# Theese need to be defined +chmod +x $CONFIGURE_SCRIPT + +# These need to be defined if [ -z "$SERVER_NAME" ]; then echo FATAL: SERVER_NAME not defined 1>&2 exit 1; From 0058bd9acc110ebec9d4115146f6b5574f4765cd Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:34:14 +0200 Subject: [PATCH 10/15] Revert "modified: run.sh" This reverts commit 5d4deed206b0c3ffa65ed0fa9e8882d6f683e4e4. --- run.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/run.sh b/run.sh index ee88e3e..99ee4bb 100755 --- a/run.sh +++ b/run.sh @@ -6,9 +6,7 @@ CONFIGURE_SCRIPT=/opt/perforce/sbin/configure-helix-p4d.sh SERVERS_ROOT=/opt/perforce/servers CONFIG_ROOT=/etc/perforce/p4dctl.conf.d -chmod +x $CONFIGURE_SCRIPT - -# These need to be defined +# Theese need to be defined if [ -z "$SERVER_NAME" ]; then echo FATAL: SERVER_NAME not defined 1>&2 exit 1; From b1a5e7ddaa383b70d3e7faddf1055cabf155909b Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 01:39:43 +0200 Subject: [PATCH 11/15] Specified volumes more accurately. --- Dockerfile | 3 +++ docker-compose.yml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 77ec15f..12aa88b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,8 @@ apt-get update && apt-get install -y helix-p4d=2019.2-1942501~bionic && \ rm -rf /var/log/* && \ rm -rf /var/lib/apt/lists/* +VOLUME /opt/perforce/servers +VOLUME /opt/perforce/triggers + COPY run.sh / CMD ["/run.sh"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 36272af..462f10a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,8 @@ services: context: . dockerfile: Dockerfile volumes: - - /mnt/dockervolumes/perforce:/opt/perforce + - /mnt/dockervolumes/perforce/servers:/opt/perforce/servers + - /mnt/dockervolumes/perforce/triggers:/opt/perforce/triggers ports: - "${P4PORTNUM:-1666}:${P4PORTNUM:-1666}" networks: From 8247b5ea54c8635c228aac5aa1f5274d86c589ad Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 02:56:53 +0200 Subject: [PATCH 12/15] Made docker volume path customizable. --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 462f10a..dfba7b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,8 +13,8 @@ services: context: . dockerfile: Dockerfile volumes: - - /mnt/dockervolumes/perforce/servers:/opt/perforce/servers - - /mnt/dockervolumes/perforce/triggers:/opt/perforce/triggers + - ${P4DOCKERVOL:-/mnt/dockervolumes/perforce}/servers:/opt/perforce/servers + - ${P4DOCKERVOL:-/mnt/dockervolumes/perforce}/triggers:/opt/perforce/triggers ports: - "${P4PORTNUM:-1666}:${P4PORTNUM:-1666}" networks: From 26ef247ae156ffd9026ea2b29828f76df3f31298 Mon Sep 17 00:00:00 2001 From: Glitched Polygons <37942667+GlitchedPolygons@users.noreply.github.com> Date: Fri, 10 Apr 2020 16:50:05 +0200 Subject: [PATCH 13/15] Update README.md --- README.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a3577c8..d0c7109 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,28 @@ docker-perforce =============== [![License: MIT](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/noonien/docker-perforce-server/blob/master/LICENSE) -This is a collection of docker images to run products provided by [Perforce](http://www.perforce.com/). +Quick and easy way of setting up a Perforce Helix server using [docker-compose](https://docs.docker.com/compose/). -Details -------- -This collection currently includes: +## How to get started - - [perforce-base](perforce-base) - Base container, includes the Perforce APT repositories. - - [perforce-server](perforce-server/) - Perforce Helix Server container. +1. - Clone this repo +2. - Create a `.env` file inside the repo's root directory. +3. - Set the following environment variables to your desired values **(must be in `VARNAME=VALUE` format!)**. +* **P4USER** - default is `p4admin` +* **P4PORT** - default is `ssl:1666` +* **P4PORTNUM** - default is `1666` +* * This should be the same number as the one used in your **P4PORT** string. +* **P4PASSWD** - Don't use a default value; please choose a super **strong** password! +* **P4DOCKERVOL** - default is `/mnt/dockervolumes/perforce` +* * This is where the docker volume will be mounted to on your host machine. Your entire perforce server instance lives inside there. It's therefore recommended to pick a path with abundant disk space... +* **SERVER_NAME** - default is `p4dsrv` -Contributing ------------- -Contributing is always welcome and appreciated! Pull requests and issues will -be processed as fast as possible! +4. - Open the p4d port (default is port number 1666) +5. - Install [Docker Engine](https://docs.docker.com/engine/install/) and [docker-compose](https://docs.docker.com/compose/install/) if you haven't already. +6. - run `sudo docker-compose up -d` + +Your server should now be up and running, listening to the specified port, using the specified user credentials. + +If anything goes wrong and your server doesn't work, run `sudo docker-compose down --remove-orphans` and then `sudo docker-compose up`. +Without the `-d` argument, you will see what's logged to the terminal and act accordingly. Once everything works, `Ctrl + C` (this shuts the helix server down) and then you can proceed to repeat step 6 above. From 3bb9758baaa837ee295f8593c828a13b35574fb9 Mon Sep 17 00:00:00 2001 From: Glitched Polygons Date: Fri, 10 Apr 2020 16:50:54 +0200 Subject: [PATCH 14/15] Deleted "perforce-search/" --- perforce-search/Dockerfile | 25 ------------ perforce-search/README.md | 23 ----------- perforce-search/run.sh | 79 -------------------------------------- 3 files changed, 127 deletions(-) delete mode 100644 perforce-search/Dockerfile delete mode 100644 perforce-search/README.md delete mode 100755 perforce-search/run.sh diff --git a/perforce-search/Dockerfile b/perforce-search/Dockerfile deleted file mode 100644 index ff83cde..0000000 --- a/perforce-search/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM noonien/perforce-base -LABEL maintainer="George Jiglau " - -RUN apt-get install -y perforce-cli default-jre-headless - -RUN wget -q -O- http://www.perforce.com/downloads/perforce/r14.1/bin.java/p4search.tgz | tar zx -C /opt \ - && mv /opt/p4search-2014.1.828661 /opt/perforce/search \ - && cd /opt/perforce/search \ - && mv jetty jetty-config \ - && tar zxf solr-4.5.1.tgz \ - && tar zxf jetty-distribution-8.1.14.v20131031.tar.gz \ - && mv solr-4.5.1 solr \ - && mv jetty-distribution-8.1.14.v20131031 jetty \ - && mv solr-config/4.5.1/schema.xml solr/example/solr/collection1/conf \ - && mv scripts/solr-control.sh solr/example \ - && rm -rf jetty/webapps/* jetty/contexts/* \ - && mv p4-search*.war jetty/webapps/p4-search.war \ - && mv jetty-config/contexts/*.xml jetty/contexts \ - && mv conf/search.config jetty/resources \ - && mv scripts/p4search-control.sh jetty \ - && rm -rf conf jetty-* solr-* scripts install.sh - -COPY run.sh / -CMD ["/run.sh"] - diff --git a/perforce-search/README.md b/perforce-search/README.md deleted file mode 100644 index 64b5899..0000000 --- a/perforce-search/README.md +++ /dev/null @@ -1,23 +0,0 @@ -perforce-search -=============== -[![Docker Build Status](http://hubstatus.container42.com/noonien/perforce-search)](https://registry.hub.docker.com/u/noonien/perforce-search) - -This is a docker image for the [Perforce Search](http://www.perforce.com/). - -Usage ------ - - docker run -e P4PORT= -e P4USER= -e P4PASSWD= -e P4TOKEN= noonien/perforce-search - -Details -------- -The following environment variables are available: - - - P4PORT - Address on which to listen. Described [here](http://www.perforce.com/perforce/doc.current/manuals/cmdref/P4PORT.html). Required. - - P4USER - Superuser username. Only created when creating a new search. Required. - - P4PASSWD - Superuser password. Required when creating a new search. Required. - - P4TOKEN - Token to use when receving pushes from perforce. Required. - - P4CHARSET - Server charset. Optional. - - P4COMMONSURL - Commons URL. Optional. - - P4WEBURL - Perforce Web URL. Optional. - - P4SWARMURL - Perforce Swarm URL. Optional diff --git a/perforce-search/run.sh b/perforce-search/run.sh deleted file mode 100755 index 6329245..0000000 --- a/perforce-search/run.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -for config in P4PORT P4USER P4PASSWD P4TOKEN; do - if [ -z "${!config:-}" ]; then - echo FAIL: $config not defined 1>&2 - exit 1 - fi -done - - -# Trust the server when connecting over ssl -if [[ $P4PORT == "ssl"* ]]; then - echo SSL connection detected, establishing trust - if ! p4 trust -y; then - echo FAIL: Could not establish trust for $P4PORT 1>&2 - exit 1 - fi -fi - -# Check login -if ! echo $P4PASSWD | p4 login > /dev/null; then - echo FAIL: Could not login using provided user/password - exit 1 -fi - -cd /opt/perforce/search - -# Configure files -## Server connection details -PROTOCOL=none -HOST=127.0.0.1 -parts=(${P4PORT//:/ }) -case ${#parts[@]} in - 1) - PORT=${parts[0]} - ;; - 2) - HOST=${parts[0]} - PORT=${parts[1]} - ;; - 3) - PROTOCOL=${parts[0]} - HOST=${parts[1]} - PORT=${parts[2]} - ;; -esac - -sed -i 's/\(serverProtocol\)=.*/\1='$PROTOCOL'/' jetty/resources/search.config -sed -i 's/\(serverHost\)=.*/\1='$HOST'/' jetty/resources/search.config -sed -i 's/\(serverPort\)=.*/\1='$PORT'/' jetty/resources/search.config -sed -i 's/\(indexerUser\)=.*/\1='$P4USER'/' jetty/resources/search.config -sed -i 's/\(indexerPassword\)=.*/\1='$P4PASSWD'/' jetty/resources/search.config -if [ ! -z "$P4CHARSET" ]; then - sed -i 's/\(serverCharset\)=.*/\1='$P4CHARSET'/' jetty/resources/search.config -fi -if [ ! -z "$P4COMMONSURL" ]; then - sed -i 's>^\(# \|\)\(com.perforce.search.commonsURL\)=.*>\2='$P4COMMONSURL'>' jetty/resources/search.config -fi -if [ ! -z "$P4WEBURL" ]; then - sed -i 's>^\(# \|\)\(com.perforce.search.webURL\)=.*>\2='$P4WEBURL'>' jetty/resources/search.config -fi -if [ ! -z "$P4SWARMURL" ]; then - sed -i 's>^\(# \|\)\(com.perforce.search.swarmURL\)=.*>\2='$P4SWARMURL'>' jetty/resources/search.config -fi - -# Token -sed -i 's/^# \(com.perforce.search.fileScannerToken\)/\1/' jetty/resources/search.config -sed -i 's/\(searchEngineToken\)=.*/\1='$P4TOKEN'/' jetty/resources/search.config - -## Solr config -sed -i 's/^JPORT=.*/JPORT=8983/' solr/example/solr-control.sh -sed -i 's/^STOP=.*/STOP=8984/' solr/example/solr-control.sh - -# Start solr and jetty/p4search -solr/example/solr-control.sh start -jetty/p4search-control.sh start - -JETTY_PID=$(ps axf | grep jetty/start.jar | grep -v grep | awk '{print $1}') -tail --pid=$JETTY_PID -f start.log logs/solr.log From d14bb07b04686701daa5d244f2c29ebd9b9501ed Mon Sep 17 00:00:00 2001 From: Glitched Polygons GmbH <37942667+GlitchedPolygons@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:10:41 +0200 Subject: [PATCH 15/15] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index d0c7109..6fbe77f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ +> [!IMPORTANT] +> +> # **NOTICE:** +> +> ## Development of this project has been migrated to: https://codeberg.org/GlitchedPolygons/docker-perforce +> +> ## All pull requests and issues on GitHub will be ignored from the 16th of August, 2025 onwards. + docker-perforce =============== [![License: MIT](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/noonien/docker-perforce-server/blob/master/LICENSE)