Skip to content

Commit

Permalink
build: bte-trapi->retriever
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed May 7, 2024
1 parent 320c220 commit 9eb2742
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .compose-env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
REDIS_HOST=redis
REDIS_PORT=6379
DEBUG=biomedical-id-resolver,bte*
DEBUG=biomedical-id-resolver,retriever*
DEBUG_COLORS=true

14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Build (remove --squash if docker does not support it):
# docker build --rm --force-rm --compress --squash -t biothings/bte-trapi .
# docker build --rm --force-rm --compress --squash -t BioPack-team/retriever .
# Run:
# docker run -it --rm -p 3000:3000 --name bte-trapi biothings/bte-trapi
# docker run -it --rm -p 3000:3000 --name retriever BioPack-team/retriever
# Run with DEBUG logs enabled:
# docker run -it --rm -p 3000:3000 --name bte-trapi -e DEBUG="biomedical-id-resolver,bte*" biothings/bte-trapi
# docker run -it --rm -p 3000:3000 --name retriever -e DEBUG="biomedical-id-resolver,retriever*" BioPack-team/retriever
# Run with redis-server running on host:
# docker run -it --rm -p 3000:3000 --name bte-trapi -e REDIS_HOST=host.docker.internal -e REDIS_PORT=6379 -e DEBUG="biomedical-id-resolver,bte*" biothings/bte-trapi
# docker run -it --rm -p 3000:3000 --name retriever -e REDIS_HOST=host.docker.internal -e REDIS_PORT=6379 -e DEBUG="biomedical-id-resolver,retriever*" BioPack-team/retriever
# Log into container:
# docker exec -ti bte-trapi sh
# docker exec -ti retriever sh
FROM node:18-alpine
ARG debug
RUN apk add --no-cache bash
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN pm2 install pm2-logrotate
RUN pm2 set pm2-logrotate:max_size 1G
EXPOSE 3000
ENV NODE_ENV production
ENV DEBUG ${debug:+biomedical-id-resolver,bte*}
ENV DEBUG ${debug:+biomedical-id-resolver,retriever*}
ENV API_OVERRIDE true
# ENV USE_THREADING ${debug:+false}
CMD ["pm2-runtime", "bte-pm2.json", "--env prodci", "--only", "bte-trapi"]
CMD ["pm2-runtime", "pm2.json", "--env prodci", "--only", "retriever"]
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: '3'
services:
bte:
container_name: bte-trapi
retriever:
container_name: retriever
restart: on-failure
build: .
image: biothings/bte-trapi
image: BioPack-team/retriever
ports:
- '3000:3000'
env_file: .compose-env
redis:
container_name: bte-redis
container_name: retriever-redis
restart: on-failure
image: "redis:alpine"
volumes:
Expand Down
4 changes: 2 additions & 2 deletions bte-pm2.json → pm2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"apps": [
{
"name": "bte-trapi",
"name": "retriever",
"cwd": ".",
"script": "./packages/server/built/server.js",
"node_args": [
Expand Down Expand Up @@ -39,7 +39,7 @@
"REDIS_CLUSTER": true
},
"env_dev": {
"DEBUG": "biomedical-id-resolver,bte*",
"DEBUG": "DEBUG=biomedical-id-resolver,retriever*",
"REDIS_HOST": "localhost",
"REDIS_PORT": 6379,
"RESULT_CACHING": false
Expand Down

0 comments on commit 9eb2742

Please sign in to comment.