-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from duocang/modulization
bug fix of docker deployment
- Loading branch information
Showing
19 changed files
with
617 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
source scripts/colored_print.sh | ||
|
||
rm -rf conf/nginx_singularity.conf | ||
|
||
print_green "生成nginx_singularity.conf..." | ||
bash scripts/create_nginx_conf_singularity.sh start | ||
|
||
# 定义文件和镜像名称 | ||
DEF_FILE="Singularities/Singularity_nginx.def" | ||
SIMG_FILE="Singularities/nginx.simg" | ||
|
||
rm -f "$SIMG_FILE" | ||
print_orange "已删除 $SIMG_FILE 文件,并重现构建镜像。" | ||
singularity build --fakeroot $SIMG_FILE $DEF_FILE | ||
|
||
#################################### 运行镜像 #################################### | ||
singularity run \ | ||
--bind ./result:/etc/nginx/html \ | ||
$SIMG_FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
server { | ||
listen 84; | ||
listen [::]:84; | ||
listen 19258; | ||
listen [::]:19258; | ||
server_name localhost_pmet; | ||
|
||
# access_log /var/log/nginx/localhost.access.log; | ||
# access_log /var/log/nginx/localhost_pmet.access.log; | ||
|
||
location /result { | ||
# autoindex on; | ||
alias /usr/share/nginx/pmet; | ||
alias /etc/nginx/html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
https://bar.utoronto.ca/pmet_result/ | ||
http://localhost:84/result/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
# 检查是否提供了两个参数 | ||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 <SHINY_CONF> <NGINX_CONF>" | ||
exit 1 | ||
fi | ||
|
||
SHINY_CONF=$1 | ||
NGINX_CONF=$2 | ||
|
||
# 生成 docker-compose.yml 文件 | ||
cat <<EOF > docker-compose.yml | ||
x-yml-version: '3.8' | ||
services: | ||
shiny-app: | ||
build: | ||
context: . | ||
dockerfile: dockerfiles/Dockerfile.shiny | ||
container_name: shiny | ||
user: "$(id -u):$(id -g)" | ||
volumes: | ||
# - ./data/indexing:/home/shiny/PMET_docker/data/indexing | ||
# - ./result:/home/shiny/PMET_docker/result | ||
# - ./logs:/var/log/shiny-server | ||
- ./result:/srv/shiny-server/pmet/result | ||
ports: | ||
- "$SHINY_CONF:$SHINY_CONF" | ||
networks: | ||
- app-network | ||
nginx-server: | ||
build: | ||
context: . | ||
dockerfile: dockerfiles/Dockerfile.nginx | ||
container_name: nginx | ||
volumes: | ||
- ./result:/etc/nginx/html | ||
ports: | ||
- "$NGINX_CONF:$NGINX_CONF" | ||
restart: always | ||
networks: | ||
- app-network | ||
volumes: | ||
logs: | ||
result: | ||
networks: | ||
app-network: | ||
EOF |
Oops, something went wrong.