(1) Goto any working directory, and setup a project directory
$ cat <<EOF > config.py
port_number = 8000
elasticsearch_url = "http://18.141.138.205:9200" #no trailing slash
redis_url = "redis"
redis_port = 6379
redis_password = "iApp1234"
env = "development"
debug = True
cat1_name = "meta_doc_category_level1"
cat2_name = "meta_doc_category_level2"
cat3_name = "meta_doc_category_level3"
EOF
(3) Make redis directory and chmod to 777 for allowing whole directory read and write permission.
$ mkdir redis
$ sudo chmod 777 -R redis
(4) Add docker-compose.yaml
$ cat <<EOF > docker-compose.yaml
version: '3.7'
services:
advanced_search:
# If you did not get the container path, please contact info@iapp.co.th
image: <IAPP ADVANCED SERCH CONTAINER PATH>
environment:
- LANG=en_US.UTF-8
volumes:
- ./config.py:/usr/src/app/config.py
ports:
- "8000:8000"
redis:
image: 'bitnami/redis:latest'
ports:
- 6379:6379
environment:
- REDIS_PASSWORD=iApp1234
volumes:
- ./redis:/bitnami
EOF
(5) Start running container as a daemon state (Backend service) using docker-compose.
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
06f037a9a2db bitnami/redis:latest "/opt/bitnami/script…" 13 minutes ago Up 12 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp docker_redis_1
2594218ccea7 gcr.io/iapp-gcr-public/iapp-advanced-search_web:20230326 "python web.py" 21 minutes ago Up 12 minutes 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp docker_advanced_search_1
ce1c33e5beca docker.elastic.co/kibana/kibana:7.17.8 "/bin/tini -- /usr/l…" 3 weeks ago Up 9 days 0.0.0.0:5601->5601/tcp, :::5601->5601/tcp docker_kibana_1
de7e0128f9a2 docker.elastic.co/elasticsearch/elasticsearch:7.17.8 "/bin/tini -- /usr/l…" 3 weeks ago Up 2 days (healthy) 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp docker_elasticsearch_1