Skip to content

Commit

Permalink
Rename ShareYourCloning to OpenCloning (#48)
Browse files Browse the repository at this point in the history
* rename shareyourcloning to opencloning

* use prod image in example for opencloning
  • Loading branch information
manulera authored Feb 5, 2025
1 parent f2d2bb8 commit c5ac138
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions src/docker-compose.yml-EXAMPLE
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ services:
#- USE_FINGERPRINTER=false
#- FINGERPRINTER_URL=http://chem-plugin:8000/
# This is for the integration of the DNA Cloning tool
#- USE_SHAREYOURCLONING=false
#- SHAREYOURCLONING_URL=http://syc-plugin/
#- USE_OPENCLONING=false
#- OPENCLONING_URL=http://opencloning-plugin/

#######
# DEV #
Expand Down Expand Up @@ -418,16 +418,16 @@ services:
# networks:
# - elabftw-net

#syc-plugin:
# image: manulera/shareyourcloning:latest-syc-base
# container_name: syc-plugin
#opencloning-plugin:
# image: manulera/opencloning:prod-oc-base
# container_name: opencloning-plugin
# restart: always
# networks:
# - elabftw-net
# environment:
# - ALLOWED_ORIGINS=*
# - ROOT_PATH=/shareyourcloning
# - BACKEND_URL=/shareyourcloning/
# - ROOT_PATH=/opencloning
# - BACKEND_URL=/opencloning/


# example of a redis container
Expand Down
14 changes: 7 additions & 7 deletions src/entrypoint/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ getEnv() {
indigo_url=${INDIGO_URL:-https://chem-plugin.elabftw.net/}
use_fingerprinter=${USE_FINGERPRINTER:-false}
fingerprinter_url=${FINGERPRINTER_URL:-https://chem-plugin.elabftw.net:8000/}
use_shareyourcloning=${USE_SHAREYOURCLONING:-false}
shareyourcloning_url=${SHAREYOURCLONING_URL:-https://syc.elabftw.net/}
use_opencloning=${USE_OPENCLONING:-false}
opencloning_url=${OPENCLONING_URL:-https://opencloning.elabftw.net/}
use_persistent_mysql_conn=${USE_PERSISTENT_MYSQL_CONN:-true}
}

Expand Down Expand Up @@ -181,11 +181,11 @@ nginxConf() {
sed -i -e "s|^#\s*include /etc/nginx/fingerprinter.conf|include /etc/nginx/fingerprinter.conf|" /etc/nginx/common.conf
sed -i -e "s|%FINGERPRINTER_URL%|${fingerprinter_url}|" /etc/nginx/fingerprinter.conf
fi
if [ "$shareyourcloning_url" != "false" ] && [ -n "$shareyourcloning_url" ] && [ "$use_shareyourcloning" != "false" ] && [ -n "$use_shareyourcloning" ]; then
if [ "$opencloning_url" != "false" ] && [ -n "$opencloning_url" ] && [ "$use_opencloning" != "false" ] && [ -n "$use_opencloning" ]; then
# remove the trailing / if it exists, or it doesn't work
syc_url=${shareyourcloning_url%/}
sed -i -e "s|^#\s*include /etc/nginx/shareyourcloning.conf|include /etc/nginx/shareyourcloning.conf|" /etc/nginx/common.conf
sed -i -e "s|%SHAREYOURCLONING_URL%|${syc_url}|" /etc/nginx/shareyourcloning.conf
oc_url=${opencloning_url%/}
sed -i -e "s|^#\s*include /etc/nginx/opencloning.conf|include /etc/nginx/opencloning.conf|" /etc/nginx/common.conf
sed -i -e "s|%OPENCLONING_URL%|${oc_url}|" /etc/nginx/opencloning.conf
fi

# SET REAL IP CONFIG
Expand Down Expand Up @@ -275,7 +275,7 @@ phpfpmConf() {
# external services, we want to easily know from php app if they are available
sed -i -e "s/%USE_INDIGO%/${use_indigo}/" $f
sed -i -e "s/%USE_FINGERPRINTER%/${use_fingerprinter}/" $f
sed -i -e "s/%USE_SHAREYOURCLONING%/${use_shareyourcloning}/" $f
sed -i -e "s/%USE_OPENCLONING%/${use_opencloning}/" $f
# persistent mysql connection setting
sed -i -e "s/%USE_PERSISTENT_MYSQL_CONN%/${use_persistent_mysql_conn}/" $f
}
Expand Down
4 changes: 2 additions & 2 deletions src/nginx/common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ location = /nginx-status {
#include /etc/nginx/indigo.conf;
# this line will be uncommented if FINGERPRINTER_URL is set
#include /etc/nginx/fingerprinter.conf;
# this line will be uncommented if SHAREYOURCLONING_URL is set
#include /etc/nginx/shareyourcloning.conf;
# this line will be uncommented if OPENCLONING_URL is set
#include /etc/nginx/opencloning.conf;

# deny access to hidden files/folders
location ~ /\. { access_log off; log_not_found off; deny all; }
Expand Down
4 changes: 4 additions & 0 deletions src/nginx/opencloning.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
location ^~ /opencloning {
# this URL is set by entrypoint script
proxy_pass %OPENCLONING_URL%;
}
4 changes: 0 additions & 4 deletions src/nginx/shareyourcloning.conf

This file was deleted.

2 changes: 1 addition & 1 deletion src/php/elabpool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ env[ELAB_AWS_SECRET_KEY] = "%ELAB_AWS_SECRET_KEY%"
env[INVOKER_PSK] = "%INVOKER_PSK%"
env[USE_INDIGO] = "%USE_INDIGO%"
env[USE_FINGERPRINTER] = "%USE_FINGERPRINTER%"
env[USE_SHAREYOURCLONING] = "%USE_SHAREYOURCLONING%"
env[USE_OPENCLONING] = "%USE_OPENCLONING%"
env[USE_PERSISTENT_MYSQL_CONN] = "%USE_PERSISTENT_MYSQL_CONN%"

php_admin_value[memory_limit] = %PHP_MAX_MEMORY%
Expand Down

0 comments on commit c5ac138

Please sign in to comment.