Skip to content

Commit

Permalink
Merge pull request #320 from hubmapconsortium/yuanzhou/new-docker-bas…
Browse files Browse the repository at this point in the history
…e-and-stage-delete

Yuanzhou/new docker base and stage delete
  • Loading branch information
yuanzhou authored Sep 19, 2024
2 parents ce02e84 + c29efa3 commit 6a4dd83
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 260 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.33
2.2.0
2 changes: 0 additions & 2 deletions docker-compose.deployment.prod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

services:

hubmap-auth:
Expand Down
17 changes: 0 additions & 17 deletions docker-compose.deployment.stage.yml

This file was deleted.

2 changes: 0 additions & 2 deletions docker-compose.deployment.test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

services:

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

services:

hubmap-auth:
Expand Down
10 changes: 5 additions & 5 deletions docker-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function get_dir_of_this_script () {
}


if [[ "$1" != "test" && "$1" != "stage" && "$1" != "prod" ]]; then
echo "Unknown deployment environment '$1', specify one of the following: test|stage|prod"
if [[ "$1" != "test" && "$1" != "prod" ]]; then
echo "Unknown deployment environment '$1', specify one of the following: test|prod"
else
if [[ "$2" != "start" && "$2" != "stop" && "$2" != "down" ]]; then
echo "Unknown command '$2', specify one of the following: start|stop|down"
Expand All @@ -61,11 +61,11 @@ else
echo

if [ "$2" = "start" ]; then
docker-compose -f docker-compose.yml -f docker-compose.deployment.$1.yml -p gateway up -d
docker compose -f docker-compose.yml -f docker-compose.deployment.$1.yml -p gateway up -d
elif [ "$2" = "stop" ]; then
docker-compose -f docker-compose.yml -f docker-compose.deployment.$1.yml -p gateway stop
docker compose -f docker-compose.yml -f docker-compose.deployment.$1.yml -p gateway stop
elif [ "$2" = "down" ]; then
docker-compose -f docker-compose.yml -f docker-compose.deployment.$1.yml -p gateway down
docker compose -f docker-compose.yml -f docker-compose.deployment.$1.yml -p gateway down
fi
fi
fi
10 changes: 5 additions & 5 deletions docker-development.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ else

echo 'Checks complete, all good :)'
elif [ "$1" = "config" ]; then
docker-compose -f docker-compose.yml -f docker-compose.development.yml -p gateway config
docker compose -f docker-compose.yml -f docker-compose.development.yml -p gateway config
elif [ "$1" = "build" ]; then
# Delete old VERSION and BUILD files if found
if [ -f "hubmap-auth/VERSION" ]; then
Expand All @@ -87,13 +87,13 @@ else
cp ./VERSION hubmap-auth
cp ./BUILD hubmap-auth

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

2 changes: 1 addition & 1 deletion hubmap-auth/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 Authentication and Authorization Service"

Expand Down
4 changes: 2 additions & 2 deletions hubmap-auth/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [ $DEPLOY_MODE != "localhost" ]; then
chown -R hubmap:hubmap /etc/letsencrypt
fi

# 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 "$@"
135 changes: 0 additions & 135 deletions nginx/conf.d-stage/hubmap-auth.conf

This file was deleted.

84 changes: 0 additions & 84 deletions nginx/conf.d-stage/portal-ui.conf

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server {
# Only root can listen on ports below 1024, we use higher-numbered ports
# since nginx is running under non-root user hubmap
listen 8080;
server_name portal-prod.stage.hubmapconsortium.org;
server_name portal-prod.test.hubmapconsortium.org;

location / {
return 301 https://$host$request_uri;
Expand All @@ -15,11 +15,11 @@ server {
# Only root can listen on ports below 1024, we use higher-numbered ports
# since nginx is running under non-root user hubmap
listen 4430 ssl; # managed by Certbot
server_name portal-prod.stage.hubmapconsortium.org;
server_name portal-prod.test.hubmapconsortium.org;
root /usr/share/nginx/html;

ssl_certificate /etc/letsencrypt/live/gateway.stage.hubmapconsortium.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/gateway.stage.hubmapconsortium.org/privkey.pem; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/gateway.test.hubmapconsortium.org/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/gateway.test.hubmapconsortium.org/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

Expand Down

0 comments on commit 6a4dd83

Please sign in to comment.