-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Fredrik Borg
committed
Apr 30, 2022
1 parent
5f9b48b
commit 9276997
Showing
6 changed files
with
167 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Docker files for scio | ||
|
||
Run analyze, tika-server and api: | ||
|
||
```bash | ||
sudo docker network create scio | ||
cd docker | ||
./run.sh | ||
``` | ||
|
||
### | ||
Remove all data from docker instance | ||
|
||
```bash | ||
docker-compose down --volumes | ||
``` | ||
|
||
### Example queries that should have hits on sample data: | ||
|
||
``` | ||
docker exec -it docker-app-1 /bin/bash | ||
http_proxy= poetry run script/populate_sample_queries.sh $METASEARCH_APIKEY | ||
``` |
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,6 @@ | ||
FROM docker.io/debian:buster | ||
|
||
RUN apt update | ||
RUN apt -y install beanstalkd | ||
|
||
ENTRYPOINT ["/usr/bin/beanstalkd"] |
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,98 @@ | ||
--- | ||
version: '3.8' | ||
|
||
networks: | ||
scio: | ||
external: true | ||
name: scio | ||
|
||
x-proxy: &proxy | ||
http_proxy: http://10.0.1.11:3128 | ||
https_proxy: http://10.0.1.11:3128 | ||
no_proxy: | ||
|
||
x-build-args: &build-args | ||
args: | ||
<<: *proxy | ||
|
||
x-common: &common | ||
networks: | ||
- scio | ||
logging: | ||
options: | ||
max-file: 5 | ||
max-size: 500m | ||
|
||
x-meta-scio: &scio | ||
build: | ||
dockerfile: docker/scio/Dockerfile | ||
context: .. | ||
<<: *build-args | ||
image: scio:dev | ||
depends_on: | ||
- elasticsearch | ||
- beanstalkd | ||
environment: | ||
BEANSTALK: beanstalkd | ||
ELASTICSEARCH: elasticsearch | ||
http_proxy: | ||
https_proxy: | ||
volumes: | ||
- cache-data:/home/scio/.cache/scio | ||
deploy: | ||
restart_policy: | ||
condition: on-failure | ||
|
||
services: | ||
scio-tika-server: | ||
<<: *common | ||
<<: *scio | ||
command: .local/bin/scio-tika-server | ||
|
||
scio-analyze: | ||
<<: *common | ||
<<: *scio | ||
command: .local/bin/scio-analyze | ||
|
||
scio-api: | ||
<<: *common | ||
<<: *scio | ||
command: .local/bin/scio-api | ||
ports: | ||
- 3000:3000 | ||
#- 127.0.0.1:3000:3000 | ||
|
||
beanstalkd: | ||
<<: *common | ||
build: | ||
context: beanstalkd/ | ||
<<: *build-args | ||
image: beanstalkd:dev | ||
command: -l 0.0.0.0 -z 262140 -V | ||
deploy: | ||
restart_policy: | ||
condition: on-failure | ||
|
||
elasticsearch: | ||
<<: *common | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.3 | ||
environment: | ||
- node.name=elasticsearch | ||
- cluster.name=scio | ||
- discovery.type=single-node | ||
- bootstrap.memory_lock=true | ||
- xpack.security.enabled=false | ||
- ES_SETTING_INGEST_GEOIP_DOWNLOADER_ENABLED=false | ||
- "ES_JAVA_OPTS=-Xms2048m -Xmx2048m" | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
volumes: | ||
- elasticsearch-data:/usr/share/elasticsearch/data | ||
|
||
volumes: | ||
elasticsearch-data: | ||
driver: local | ||
cache-data: | ||
driver: local |
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,7 @@ | ||
[global] | ||
index-url = http://artifactory.mnemonic.no/artifactory/api/pypi/virt-pypi/simple/ | ||
trusted-host = pypi.python.org artifactory.mnemonic.no | ||
# proxy = http://intern-proxy.mnemonic.no:3128 | ||
timeout = 120 | ||
cert = /etc/ssl/certs | ||
no-cache-dir = false |
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASE=$(dirname $0) | ||
|
||
cd $BASE | ||
docker-compose up -d --build --remove-orphans |
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,27 @@ | ||
FROM docker.io/debian:buster | ||
|
||
RUN apt update | ||
RUN apt -y install curl inetutils-ping telnet python3 python3-setuptools python3-pip | ||
|
||
RUN useradd -ms /bin/bash scio | ||
USER scio | ||
|
||
# All subsequent commands will be relative to /home/scio | ||
WORKDIR /home/scio | ||
|
||
RUN mkdir -p .config/pip scio/dist | ||
|
||
COPY /docker/resources/pip.conf .config/pip | ||
COPY /act scio/act | ||
COPY /etc scio/etc | ||
COPY /setup.py scio/setup.py | ||
COPY /README.md scio/README.md | ||
|
||
RUN mkdir -p /home/scio/.cache/scio | ||
RUN chown scio:scio /home/scio/.cache/scio | ||
|
||
RUN cd scio && \ | ||
rm -f dist/*gz && \ | ||
python3 setup.py sdist && \ | ||
pip3 install dist/*gz | ||
|