This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
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.
* initial commit * docker run as specific user/group * #242 support for virtual directories * #242 updated readme * #242 * #242 updated docker-compose * #242 updated docker-compose * #242 updated docker-compose * #242 updated docker-compose * #242 updated docker-compose * #242 updated docker-compose
- Loading branch information
1 parent
c2c9fd5
commit 7a1dae2
Showing
18 changed files
with
2,492 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,36 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.angular/cache | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
.env | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Sub repos | ||
/.gitmodules |
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 |
---|---|---|
|
@@ -5,32 +5,84 @@ ENV REFRESHED_AT=2022-01-06 | |
|
||
LABEL Name="senzing/entity-search-web-app-console" \ | ||
Maintainer="[email protected]" \ | ||
Version="0.0.0" | ||
Version="1.0.0" | ||
|
||
HEALTHCHECK CMD ["/app/healthcheck.sh"] | ||
|
||
# Run as "root" for system installation. | ||
|
||
USER root | ||
|
||
# Install packages via PIP. | ||
# Install packages via apt. | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install \ | ||
build-essential \ | ||
elfutils \ | ||
fio \ | ||
htop \ | ||
iotop \ | ||
ipython3 \ | ||
itop \ | ||
less \ | ||
libpq-dev \ | ||
net-tools \ | ||
odbc-postgresql \ | ||
procps \ | ||
pstack \ | ||
python-dev \ | ||
python-pyodbc \ | ||
python-setuptools \ | ||
strace \ | ||
telnet \ | ||
tree \ | ||
unixodbc \ | ||
unixodbc-dev \ | ||
vim \ | ||
zip | ||
|
||
# Install Nodejs | ||
RUN apt-get -y install curl software-properties-common \ | ||
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - | ||
|
||
RUN apt-get -yq install \ | ||
nodejs \ | ||
&& npm install -g npm \ | ||
&& node -v | ||
|
||
# Remove old lists | ||
RUN rm -rf /var/lib/apt/lists/* | ||
|
||
# Install packages via pip. | ||
|
||
COPY requirements.txt ./ | ||
RUN pip3 install --upgrade pip \ | ||
&& pip3 install -r requirements.txt \ | ||
&& rm requirements.txt | ||
|
||
# Install packages via apt. | ||
|
||
# Copy files from repository. | ||
|
||
COPY ./rootfs / | ||
COPY ./run /app/run | ||
COPY package.json /app | ||
COPY package-lock.json /app | ||
|
||
# Install packages via npm | ||
WORKDIR /app | ||
#RUN npm install -g npm | ||
RUN npm i --production | ||
|
||
# update npm vulnerabilites | ||
#RUN npm -g uninstall npm | ||
#RUN rm -fr /usr/local/lib/node_modules/npm | ||
|
||
# Make non-root container. | ||
|
||
RUN addgroup --gid 1004 consoleusers \ | ||
&& useradd -u 1001 -g 1004 -m senzing -s /bin/bash | ||
USER 1001 | ||
|
||
# Runtime execution. | ||
|
||
WORKDIR /app | ||
CMD ["/app/sleep-infinity.sh"] | ||
ENTRYPOINT [ "node" ] | ||
CMD ["./run/xterm"] | ||
#CMD ["/app/sleep-infinity.sh"] |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
## Which issue does this address | ||
|
||
Issue number: #nnn | ||
resolves #nnn | ||
|
||
## Why was change needed | ||
|
||
|
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 |
---|---|---|
@@ -1 +1,80 @@ | ||
# entity-search-web-app-console | ||
# entity-search-web-app-console | ||
|
||
## Synopsis | ||
|
||
The `senzing/entity-search-web-app-console` docker image is used for creating | ||
a running Docker container configured to run Senzing programs and utilities through the entity-search-web-app's xterm console(/admin/console). For security and modularity reasons the web based console is a separate container from the webapp itself. | ||
|
||
## Overview | ||
|
||
The default behavior when running `docker run` is for the container to spin up a PTY and serve up a bidirection websocket server to allow the webapp to send and recieve input to that PTY. | ||
|
||
### Prerequisite software | ||
|
||
The following software programs need to be installed: | ||
|
||
1. [docker](https://github.com/Senzing/knowledge-base/blob/master/HOWTO/install-docker.md) | ||
2. [docker-compose](https://github.com/Senzing/knowledge-base/blob/master/HOWTO/install-docker-compose.md) | ||
|
||
### Pull latest docker images | ||
|
||
1. Pull the latest release of this app from [Docker Hub](https://hub.docker.com/r/senzing/entity-search-web-app-console). | ||
Example: | ||
|
||
```console | ||
sudo docker pull senzing/entity-search-web-app-console | ||
``` | ||
|
||
### Configuration | ||
|
||
#### Environment Variables | ||
|
||
- `SENZING_CONSOLE_SERVER_PORT` is the port to run the xterm server on. | ||
- `SENZING_CONSOLE_SERVER_URL` is the full url that the console server should respond to. | ||
So if your console server is running on port `2370` it would be `https://mydomain:2730`. If you are running behind a virtual path like `/app/console` it would be `https://mydomain:2730/app/console`. This variable has to be mirrored in the configuration of the (entity-search-web-app)[https://github.com/Senzing/entity-search-web-app] configuration. If misconfigured the console functionality will not be available in the UI. | ||
|
||
#### Cmdline Switches | ||
|
||
- `webServerPortNumber` is the port to run the xterm server on. | ||
- `confServerPortNumber` is the full url that the console server should respond to. | ||
So if your console server is running on port `2370` it would be `https://mydomain:2730`. If you are running behind a virtual path like `/app/console` it would be `https://mydomain:2730/app/console`. This variable has to be mirrored in the configuration of the (entity-search-web-app)[https://github.com/Senzing/entity-search-web-app] configuration. If misconfigured the console functionality will not be available in the UI. | ||
|
||
### Air Gapped Environments | ||
|
||
Obviously if your deployment environment is highly restricted you're probably going | ||
to run in to issues downloading the latest images from that context. | ||
Please refer to | ||
"[Install docker image in an air-gapped environment](https://github.com/Senzing/knowledge-base/blob/master/HOWTO/install-docker-image-in-air-gapped-enviroment.md)" | ||
for how to procedure regarding this use-case. | ||
|
||
The short version is find a machine with network access, then: | ||
|
||
1. Pull the docker images you need to that machine. | ||
2. Package them as a tar file. Example: | ||
|
||
```console | ||
sudo docker save senzing/entity-search-web-app-console --output senzing-entity-search-web-app-console-latest.tar | ||
``` | ||
|
||
3. Copy that to the deployment machine. | ||
4. Load via | ||
|
||
```console | ||
sudo docker load --input senzing-entity-search-web-app-console-latest.tar | ||
``` | ||
|
||
### Building from Source | ||
|
||
1. Build the web app console. | ||
Example: | ||
|
||
```console | ||
sudo docker build --tag senzing/entity-search-web-app-console . | ||
``` | ||
|
||
2. Run the app. | ||
Example: | ||
|
||
```console | ||
sudo docker-compose up | ||
``` |
Oops, something went wrong.