Skip to content

Commit

Permalink
fix port error, add service starting scripts, add deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ARQtty committed Dec 29, 2020
1 parent f0feb22 commit 59c851a
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 2 deletions.
File renamed without changes.
7 changes: 7 additions & 0 deletions recommendations_server/docs/deploy.md → docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@

## Run

For custom service container
```
./build_docker.sh
./run_docker.sh {port} {config_file_name}
```

For default services
```
cd run_services
./run_{service}.sh
```
File renamed without changes.
6 changes: 5 additions & 1 deletion recommendations_server/models/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,8 @@ def recalc():
explorations_categies = load_explorations_model(config.explorations_path)
top_popular = calc_top_popular(df)

app.run(host='0.0.0.0', port=5000)
try:
app.run(host='0.0.0.0', port=5000)
except Exception as e:
print('main exception occurs:', e)
raise e
5 changes: 5 additions & 0 deletions run_services/run_book.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker run --volume /home/iria/grouple/production/recommendations_server:/recommendations_server \
--volume /data/groupLe_recsys/processed:/data/groupLe_recsys/processed \
-p 5001:5000 \
-e CONFIG_FILE=book_setting.yml \
sagiri
5 changes: 5 additions & 0 deletions run_services/run_dorama.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker run --volume /home/iria/grouple/production/recommendations_server:/recommendations_server \
--volume /data/groupLe_recsys/processed:/data/groupLe_recsys/processed \
-p 5000:5000 \
-e CONFIG_FILE=dorama_setting.yml \
sagiri
5 changes: 5 additions & 0 deletions run_services/run_mint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker run --volume /home/iria/grouple/production/recommendations_server:/recommendations_server \
--volume /data/groupLe_recsys/processed:/data/groupLe_recsys/processed \
-p 5003:5000 \
-e CONFIG_FILE=mint_setting.yml \
sagiri
5 changes: 5 additions & 0 deletions run_services/run_read.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker run --volume /home/iria/grouple/production/recommendations_server:/recommendations_server \
--volume /data/groupLe_recsys/processed:/data/groupLe_recsys/processed \
-p 5002:5000 \
-e CONFIG_FILE=manga_setting.yml \
sagiri
5 changes: 5 additions & 0 deletions run_services/run_selfmanga.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
docker run --volume /home/iria/grouple/production/recommendations_server:/recommendations_server \
--volume /data/groupLe_recsys/processed:/data/groupLe_recsys/processed \
-p 5013:5000 \
-e CONFIG_FILE=selfmanga_setting.yml \
sagiri
2 changes: 1 addition & 1 deletion run_docker.sh → run_single_docker.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
docker run --volume /home/iria/grouple/production/recommendations_server:/recommendations_server \
--volume /data/groupLe_recsys/processed:/data/groupLe_recsys/processed \
-p 5000:$1 \
-p $1:5000 \
-e CONFIG_FILE=$2 \
sagiri

0 comments on commit 59c851a

Please sign in to comment.