Skip to content

Commit

Permalink
Docker tweaks for new base
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhou committed Sep 4, 2024
1 parent 00704da commit df27fed
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 18 deletions.
2 changes: 0 additions & 2 deletions docker/docker-compose.deployment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

services:

hs-ontology-api:
Expand Down
2 changes: 0 additions & 2 deletions docker/docker-compose.development.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

services:

hs-ontology-api:
Expand Down
3 changes: 0 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
version: "3.7"

# Will use the hostname when talking between services on the same network
services:

hs-ontology-api:
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ else
echo

if [ "$1" = "start" ]; then
docker-compose -f docker-compose.yml -f docker-compose.deployment.yml -p hs-ontology-api up -d
docker compose -f docker-compose.yml -f docker-compose.deployment.yml -p hs-ontology-api up -d
elif [ "$1" = "stop" ]; then
docker-compose -f docker-compose.yml -f docker-compose.deployment.yml -p hs-ontology-api stop
docker compose -f docker-compose.yml -f docker-compose.deployment.yml -p hs-ontology-api stop
elif [ "$1" = "down" ]; then
docker-compose -f docker-compose.yml -f docker-compose.deployment.yml -p hs-ontology-api down
docker compose -f docker-compose.yml -f docker-compose.deployment.yml -p hs-ontology-api down
fi
fi

10 changes: 5 additions & 5 deletions docker/docker-development.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ else

echo 'Checks complete, all good :)'
elif [ "$1" = "config" ]; then
docker-compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api config
docker compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api config
elif [ "$1" = "build" ]; then
# Delete the copied source code dir if exists
if [ -d "ubkg-api/src" ]; then
Expand All @@ -106,13 +106,13 @@ else
cp ../VERSION ubkg-api
cp ../BUILD ubkg-api

docker-compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api build
docker compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api build
elif [ "$1" = "start" ]; then
docker-compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api up -d
docker compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api up -d
elif [ "$1" = "stop" ]; then
docker-compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api stop
docker compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api stop
elif [ "$1" = "down" ]; then
docker-compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api down
docker compose -f docker-compose.yml -f docker-compose.development.yml -p hs-ontology-api down
fi
fi

2 changes: 1 addition & 1 deletion docker/ubkg-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parent image
FROM hubmap/api-base-image:1.0.0
FROM hubmap/api-base-image:1.1.0

LABEL description="HuBMAP and SenNet Ontology API"

Expand Down
5 changes: 3 additions & 2 deletions docker/ubkg-api/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ touch /var/run/nginx.pid
chown -R hubmap:hubmap /var/run/nginx.pid
chown -R hubmap:hubmap /var/cache/nginx
chown -R hubmap:hubmap /var/log/nginx
# Lastly we use gosu to execute our process "$@" as that user

# Lastly we use su-exec to execute our process "$@" as that user
# Remember CMD from a Dockerfile of child image gets passed to the entrypoint.sh as command line arguments
# "$@" is a shell variable that means "all the arguments"
exec /usr/local/bin/gosu hubmap "$@"
exec /usr/local/bin/su-exec hubmap "$@"

0 comments on commit df27fed

Please sign in to comment.