Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gga_load_data
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
abims
e-infra
gga_load_data
Commits
15287341
Commit
15287341
authored
3 years ago
by
Arthur Le Bars
Browse files
Options
Downloads
Patches
Plain Diff
added galaxy_nginx_conf writing
parent
139db9f1
No related branches found
No related tags found
2 merge requests
!3
release 1.0.1
,
!2
Corrections cloud
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gga_init.py
+25
-1
25 additions, 1 deletion
gga_init.py
with
25 additions
and
1 deletion
gga_init.py
+
25
−
1
View file @
15287341
...
...
@@ -76,13 +76,37 @@ class DeploySpeciesStack(speciesData.SpeciesData):
logging
.
debug
(
"
Using default banner for Tripal pages
"
)
self
.
config
.
pop
(
"
banner_path
"
,
None
)
# Write galaxy_nginx.conf
try
:
with
open
(
os
.
path
.
abspath
(
os
.
path
.
join
(
self
.
script_dir
,
"
galaxy_nginx.conf
"
)),
"
w
"
)
as
galaxy_nginx_conf
:
galaxy_nginx_conf
.
truncate
(
0
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param QUERY_STRING $query_string;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param REQUEST_METHOD $request_method;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param CONTENT_TYPE $content_type;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param CONTENT_LENGTH $content_length;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param REQUEST_URI $request_uri;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param PATH_INFO $document_uri;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param DOCUMENT_ROOT $document_root;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param SERVER_PROTOCOL $server_protocol;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param REQUEST_SCHEME $scheme;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param HTTPS $https if_not_empty;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param REMOTE_ADDR $remote_addr;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param REMOTE_PORT $remote_port;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param SERVER_PORT $server_port;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param SERVER_NAME $server_name;
"
)
galaxy_nginx_conf
.
write
(
"
uwsgi_param HTTP_REMOTE_USER gga;
"
)
except
OSError
as
exc
:
logging
.
critical
(
"
Cannot write galaxy NginX conf file (%s)
"
%
os
.
path
.
abspath
(
self
.
script_dir
))
sys
.
exit
(
exc
)
# Create nginx dirs and write/re-write nginx conf
make_dirs
(
dir_paths_li
=
[
"
./nginx
"
,
"
./nginx/conf
"
])
try
:
with
open
(
os
.
path
.
abspath
(
"
./nginx/conf/default.conf
"
),
'
w
'
)
as
conf
:
conf
.
write
(
"
server {
\n\t
listen 80;
\n\t
server_name ~.;
\n\t
location /download/ {
\n\t\t
alias /project_data/;
\n\t\t
autoindex on;
\n\t
}
\n
}
"
)
# The species nginx conf
except
OSError
as
exc
:
logging
.
critical
(
"
Cannot
ed
it NginX conf file
"
)
logging
.
critical
(
"
Cannot
wr
it
e
NginX conf file
"
)
sys
.
exit
(
exc
)
# Return to main directory
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment