Updated default environment.

This commit is contained in:
David Ball 2024-05-25 21:35:07 -04:00
parent f0a36695f4
commit 00ecaa4f46
10 changed files with 100 additions and 50 deletions

View File

@ -1,9 +1,11 @@
# You will need a .env file to use with the Docker containers. This is set up for localhost use with the Docker Compose fullstack. # You will need a .env file to use with the Docker containers. This is set up for localhost use with the Docker Compose fullstack.
# SITE_NAME is used for page generation. # SITE_NAME is used for page generation.
SITE_NAME="No Moss 3 Landfill Online Library" SITE_NAME="(dev) No Moss 3 Carbo Landfill Online Localhost"
# SITE_HOST is used for generating links for the search index. (If you leave this blank it should work using relative paths.)
SITE_HOST="localhost"
# SITE_URL is used for generating links for the search index. (If you leave this blank it should work using relative paths.) # SITE_URL is used for generating links for the search index. (If you leave this blank it should work using relative paths.)
SITE_URL="https://localhost" SITE_URL="https://$SITE_HOST"
# APP_HTTP_LISTEN_PORT is the TCP port used to access the Node application's HTTP interface (usually by a reverse proxy). # APP_HTTP_LISTEN_PORT is the TCP port used to access the Node application's HTTP interface (usually by a reverse proxy).
APP_HTTP_HOST="nm3clol" APP_HTTP_HOST="nm3clol"

40
docker/.env.nm3clol Normal file
View File

@ -0,0 +1,40 @@
# You will need a .env file to use with the Docker containers. This is set up for localhost use with the Docker Compose fullstack.
# SITE_NAME is used for page generation.
SITE_NAME="(dev) No Moss 3 Carbo Landfill Online Localhost"
# SITE_HOST is used for generating links for the search index. (If you leave this blank it should work using relative paths.)
SITE_HOST="localhost"
# SITE_URL is used for generating links for the search index. (If you leave this blank it should work using relative paths.)
SITE_URL="https://$SITE_HOST"
# APP_HTTP_LISTEN_PORT is the TCP port used to access the Node application's HTTP interface (usually by a reverse proxy).
APP_HTTP_HOST="nm3clol"
# APP_HTTP_LISTEN_PORT is the TCP port used to access the Node application's HTTP interface (usually by a reverse proxy).
APP_HTTP_LISTEN_PORT=3000
# APP_URL is the URL used to access the Node application (usually by a reverse proxy).
APP_HTTP_URL="http://$APP_HTTP_HOST:$APP_HTTP_LISTEN_PORT"
# SOLR_DOCS_HOST is the host for Apache Solr's core for indexed documents.
SOLR_DOCS_HOST="solr"
# SOLR_DOCS_PORT is the port for Apache Solr's core for indexed documents.
SOLR_DOCS_PORT=8983
# SOLR_DOCS_CORE_NAME is the core name for Apache Solr's core for indexed documents.
SOLR_DOCS_CORE_NAME="nm3clol_core"
# SOLR_DOCS_URL is the URL to access Apache Solr's core for indexed documents. It is used by Gulp and the Search feature.
SOLR_DOCS_URL="http://$SOLR_DOCS_HOST:$SOLR_DOCS_PORT/solr/$SOLR_DOCS_CORE_NAME"
# SOLR_LAW_HOST is the host for Apache Solr's core for indexed laws.
SOLR_LAW_HOST="$SOLR_DOCS_HOST"
# SOLR_LAW_PORT is the host for Apache Solr's core for indexed laws.
SOLR_LAW_PORT=$SOLR_DOCS_PORT
# SOLR_LAW_CORE_NAME is the core name for Apache Solr's core for indexed laws.
SOLR_LAW_CORE_NAME="vacode_core"
# SOLR_LAW_URL is the URL to access Apache Solr's core for indexed laws. It is used by Gulp (and eventually the Search feature.)
SOLR_LAW_URL="http://$SOLR_LAW_HOST:$SOLR_LAW_PORT/solr/$SOLR_LAW_CORE_NAME"
# TIKA_HOST is the URL to access the host running Apache Tika.
TIKA_HOST="tika"
# TIKA_PORT is the URL to access the host running Apache Tika.
TIKA_PORT=9998
# TIKA_URL is the URL to access the host running Apache Tika.
TIKA_URL="http://tika:$TIKA_PORT"

View File

@ -1,12 +1,11 @@
version: "3.8" name: nm3clol
services: services:
solr: solr:
image: solr:latest image: solr:latest
container_name: solr container_name: solr
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8983:8983" - "${SOLR_DOCS_PORT-8983}:8983"
volumes: volumes:
- ../solr-data:/var/solr - ../solr-data:/var/solr
# environment: # environment:
@ -20,25 +19,25 @@ services:
image: apache/tika:latest-full image: apache/tika:latest-full
container_name: tika container_name: tika
restart: unless-stopped restart: unless-stopped
entrypoint: [ "/bin/sh", "-c", "exec java -cp \"/customocr:/tika-server-standard-2.9.2.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $$0 $$@"]
environment: environment:
- TIKA_LOG_PATH=/tika-logs - TIKA_LOG_PATH=/tika-logs
command: -c /tika-config.xml command: -c /tika-config.xml
entrypoint: [ "/bin/sh", "-c", "exec java -cp \"/customocr:/tika-server-standard-2.9.2.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $$0 $$@"]
volumes: volumes:
- ../tika-config.xml:/tika-config.xml - ../tika-config.xml:/tika-config.xml
- ../tika-data/logs:/tika-logs - ../tika-data/logs:/tika-logs
- ../tika-data/log4j2.xml:/log4j2.xml - ../tika-data/log4j2.xml:/log4j2.xml
- ../TesseractOCRConfig.properties:/TesseractOCRConfig.properties - ../TesseractOCRConfig.properties:/TesseractOCRConfig.properties
ports: ports:
- "9998:9998" - "${TIKA_PORT-9998}:9998"
nm3clol: nm3clol:
build: ../nm3clol.Dockerfile build: ../nm3clol.Dockerfile
container_name: nm3clol container_name: nm3clol
environment: environment:
- PORT=$APP_HTTP_LISTEN_PORT - PORT=${APP_HTTP_LISTEN_PORT-3000}
ports: ports:
- "3000:3000" - "$PORT:$PORT"
caddy: caddy:
image: caddy:latest image: caddy:latest

View File

@ -1,14 +1,15 @@
version: "3.8" name: nm3clol
services: services:
nm3clol: nm3clol:
build: ../nm3clol.Dockerfile image: nm3clol/server-app
build:
context: ../../
dockerfile: docker/nm3clol.Dockerfile
container_name: nm3clol container_name: nm3clol
environment: environment:
- PORT=$APP_HTTP_LISTEN_PORT - PORT=${APP_HTTP_LISTEN_PORT-3000}
ports: ports:
- "3000:3000" - "${APP_HTTP_LISTEN_PORT-3000}:${APP_HTTP_LISTEN_PORT-3000}"
caddy: caddy:
image: caddy:latest image: caddy:latest
restart: unless-stopped restart: unless-stopped
@ -23,7 +24,6 @@ services:
- $PWD/..:/srv - $PWD/..:/srv
- caddy_data:/data - caddy_data:/data
- caddy_config:/config - caddy_config:/config
volumes: volumes:
caddy_data: caddy_data:
external: true external: true

View File

@ -1,9 +1,4 @@
www.no-moss-3-carbo-landfill-library.online { {$SITE_HOST} {
encode gzip encode gzip
redir * https://no-moss-3-carbo-landfill-library.online{uri} permanent reverse_proxy {$APP_HTTP_HOST}:{$APP_HTTP_LISTEN_PORT}
}
no-moss-3-carbo-landfill-library.online {
encode gzip
reverse_proxy localhost:3000
} }

View File

@ -1,6 +1,16 @@
FROM node:20.12.2-bookworm FROM node:20.12.2-bookworm
WORKDIR .. ENV CHECKOUT=main
VOLUME /usr/src/app
RUN apt update && apt upgrade -y && apt install git
RUN mkdir -p /usr/src/app/.git
RUN chown -R node:node /usr/src/app
RUN chmod -R 770 /usr/src/app
USER node
RUN git lfs install
ADD --keep-git-dir ../../.git /usr/src/app/.git
WORKDIR /usr/src/app
RUN git checkout
RUN npm install RUN npm install
RUN npm run-script transpile:ts RUN npm run-script transpile:ts
EXPOSE 3000 EXPOSE $PORT
CMD ["npm", "run-script", "server"] CMD ["npm", "run-script", "server"]

View File

@ -1,10 +1,15 @@
version: "3.8" name: nm3clol
services: services:
nm3clol: nm3clol:
build: ../nm3clol.Dockerfile image: nm3clol/server-app
build:
# context: ../../
dockerfile: ../nm3clol.Dockerfile
container_name: nm3clol container_name: nm3clol
volumes:
- ../../:/usr/src/app:rw
- ../nm3clol-node_modules:/usr/src/app/node_modules:rw
environment: environment:
- PORT=$APP_HTTP_LISTEN_PORT - PORT=${APP_HTTP_LISTEN_PORT-3000}
ports: ports:
- "3000:3000" - "${APP_HTTP_LISTEN_PORT-3000}:${APP_HTTP_LISTEN_PORT-3000}"

View File

@ -6,7 +6,7 @@ services:
container_name: solr container_name: solr
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8983:8983" - "${SOLR_DOCS_PORT-8983}:8983"
volumes: volumes:
- ../solr-data:/var/solr - ../solr-data:/var/solr
# environment: # environment:
@ -20,17 +20,17 @@ services:
image: apache/tika:latest-full image: apache/tika:latest-full
container_name: tika container_name: tika
restart: unless-stopped restart: unless-stopped
entrypoint: [ "/bin/sh", "-c", "exec java -cp \"/customocr:/tika-server-standard-2.9.2.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $$0 $$@"]
environment: environment:
- TIKA_LOG_PATH=/tika-logs - TIKA_LOG_PATH=/tika-logs
command: -c /tika-config.xml command: -c /tika-config.xml
entrypoint: [ "/bin/sh", "-c", "exec java -cp \"/customocr:/tika-server-standard-2.9.2.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $$0 $$@"]
volumes: volumes:
- ../tika-config.xml:/tika-config.xml - ../tika-config.xml:/tika-config.xml
- ../tika-data/logs:/tika-logs - ../tika-data/logs:/tika-logs
- ../tika-data/log4j2.xml:/log4j2.xml - ../tika-data/log4j2.xml:/log4j2.xml
- ../TesseractOCRConfig.properties:/TesseractOCRConfig.properties - ../TesseractOCRConfig.properties:/TesseractOCRConfig.properties
ports: ports:
- "9998:9998" - "${TIKA_PORT-9998}:9998"
#volumes: #volumes:
# data: # data:

View File

@ -6,7 +6,7 @@ services:
container_name: solr container_name: solr
restart: unless-stopped restart: unless-stopped
ports: ports:
- "8983:8983" - "${SOLR_DOCS_PORT-8983}:8983"
volumes: volumes:
- ../solr-data:/var/solr - ../solr-data:/var/solr
# environment: # environment:
@ -15,4 +15,3 @@ services:
- solr-precreate - solr-precreate
# - gettingstarted # - gettingstarted
user: "1000:995" user: "1000:995"

View File

@ -1,18 +1,18 @@
version: '3' version: '3'
services: services:
solr: tika:
image: solr:latest image: apache/tika:latest-full
container_name: solr container_name: tika
restart: unless-stopped restart: unless-stopped
ports: environment:
- "8983:8983" - TIKA_LOG_PATH=/tika-logs
command: -c /tika-config.xml
entrypoint: [ "/bin/sh", "-c", "exec java -cp \"/customocr:/tika-server-standard-2.9.2.jar:/tika-extras/*\" org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $$0 $$@"]
volumes: volumes:
- ../solr-data:/var/solr - ../tika-config.xml:/tika-config.xml
# environment: - ../tika-data/logs:/tika-logs
# - SOLR_CORE=my_core - ../tika-data/log4j2.xml:/log4j2.xml
command: - ../TesseractOCRConfig.properties:/TesseractOCRConfig.properties
- solr-precreate ports:
# - gettingstarted - "${TIKA_PORT-9998}:9998"
user: "1000:995"