Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
ccac8be2
Commit
ccac8be2
authored
Apr 29, 2021
by
carlosribas
Browse files
Change the path to the static files
parent
26712698
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
16 deletions
+16
-16
Dockerfile
Dockerfile
+2
-2
docker-compose.yml
docker-compose.yml
+2
-2
entrypoint.sh
entrypoint.sh
+8
-8
kubernetes/helm/templates/nginx.yaml
kubernetes/helm/templates/nginx.yaml
+2
-2
kubernetes/helm/templates/rnacentral.yaml
kubernetes/helm/templates/rnacentral.yaml
+1
-1
nginx/conf.d/local.conf
nginx/conf.d/local.conf
+1
-1
No files found.
Dockerfile
View file @
ccac8be2
...
...
@@ -25,7 +25,7 @@ RUN \
mkdir
-p
$RNACENTRAL_LOCAL
&&
\
mkdir
-p
$SUPERVISOR_CONF_DIR
&&
\
mkdir
/srv/rnacentral/log
&&
\
mkdir
/srv/static
mkdir
/srv/
rnacentral/
static
# Install Infernal and node.js
RUN
\
...
...
@@ -62,7 +62,7 @@ ADD rnacentral/portal/static/package.json rnacentral/portal/static/
RUN
cd
rnacentral/portal/static
&&
npm
install
--only
=
production
# Copy and chown all the files to the rnacentral user
COPY
rnacentral
/
$RNACENTRAL_HOME/
COPY
rnacentral $RNACENTRAL_HOME/
rnacentral
RUN
chown
-R
rnacentral:rnacentral /srv
# Install and configure packages for local development if needed
...
...
docker-compose.yml
View file @
ccac8be2
...
...
@@ -22,7 +22,7 @@ services:
expose
:
-
8000
volumes
:
-
static_volume:/srv/static
-
static_volume:/srv/
rnacentral/
static
-
./openssl/openssl.cnf:/etc/ssl/openssl.cnf
depends_on
:
-
redis
...
...
@@ -48,7 +48,7 @@ services:
-
8000:80
volumes
:
-
./nginx/conf.d:/etc/nginx/conf.d
-
static_volume:/srv/static
-
static_volume:/srv/
rnacentral/
static
depends_on
:
-
rnacentral
networks
:
...
...
entrypoint.sh
View file @
ccac8be2
...
...
@@ -26,12 +26,12 @@ SUPERVISOR_CONF_DIR=${SUPERVISOR_CONF_DIR:-"/srv/rnacentral/supervisor"}
LOGS
=
/srv/rnacentral/log
# Add local_settings file
if
[
-f
"
${
RNACENTRAL_HOME
}
"
/rnacentral/local_settings.py
]
if
[
-f
"
${
RNACENTRAL_HOME
}
"
/rnacentral/
rnacentral/
local_settings.py
]
then
echo
"INFO: RNAcentral local_settings.py file already provisioned"
else
echo
"INFO: Creating RNAcentral local_settings.py file"
cat
<<-
EOF
> "
${
RNACENTRAL_HOME
}
"/rnacentral/local_settings.py
cat
<<-
EOF
> "
${
RNACENTRAL_HOME
}
"/rnacentral/
rnacentral/
local_settings.py
import os
from .utils import get_environment
SECRET_KEY = "
$SECRET_KEY
"
...
...
@@ -75,8 +75,8 @@ else
}
}
EOF
sed
-i
"3 a DEBUG =
${
DJANGO_DEBUG
}
"
"
${
RNACENTRAL_HOME
}
"
/rnacentral/local_settings.py
chown
-R
rnacentral
"
${
RNACENTRAL_HOME
}
"
/rnacentral/local_settings.py
sed
-i
"3 a DEBUG =
${
DJANGO_DEBUG
}
"
"
${
RNACENTRAL_HOME
}
"
/rnacentral/
rnacentral/
local_settings.py
chown
-R
rnacentral
"
${
RNACENTRAL_HOME
}
"
/rnacentral/
rnacentral/
local_settings.py
fi
# Supervisor setup
...
...
@@ -96,8 +96,8 @@ else
nodaemon=true
[program:rqworkers]
command=python
$RNACENTRAL_HOME
/manage.py rqworker
directory=
$RNACENTRAL_HOME
command=python
$RNACENTRAL_HOME
/
rnacentral/
manage.py rqworker
directory=
$RNACENTRAL_HOME
/rnacentral
numprocs=1
process_name=%(program_name)s_%(process_num)s
autorestart=true
...
...
@@ -106,7 +106,7 @@ else
stdout_logfile=
${
LOGS
}
/rqworkers.out.log
[program:rnacentral]
command=gunicorn --chdir
$RNACENTRAL_HOME
--bind 0.0.0.0:8000 rnacentral.wsgi:application
command=gunicorn --chdir
$RNACENTRAL_HOME
/rnacentral
--bind 0.0.0.0:8000 rnacentral.wsgi:application
user=rnacentral
autostart=true
autorestart=true
...
...
@@ -119,6 +119,6 @@ fi
# Run collectstatic
echo
"INFO: Copying the static files"
python
"
${
RNACENTRAL_HOME
}
"
/manage.py collectstatic
--noinput
python
"
${
RNACENTRAL_HOME
}
"
/
rnacentral/
manage.py collectstatic
--noinput
exec
"
$@
"
\ No newline at end of file
kubernetes/helm/templates/nginx.yaml
View file @
ccac8be2
...
...
@@ -28,7 +28,7 @@ data:
location /static/ {
autoindex on;
alias /srv/static/;
alias /srv/
rnacentral/
static/;
}
location / {
...
...
@@ -73,7 +73,7 @@ spec:
mountPath
:
/etc/nginx/conf.d/local.conf
subPath
:
local.conf
-
name
:
static-volume
mountPath
:
/srv/static
mountPath
:
/srv/
rnacentral/
static
restartPolicy
:
Always
volumes
:
-
name
:
nginx-config
...
...
kubernetes/helm/templates/rnacentral.yaml
View file @
ccac8be2
...
...
@@ -422,7 +422,7 @@ spec:
mountPath
:
/etc/ssl/openssl.cnf
subPath
:
openssl.cnf
-
name
:
static-volume
mountPath
:
/srv/static
mountPath
:
/srv/
rnacentral/
static
envFrom
:
-
secretRef
:
name
:
{{
.Values.database
}}
...
...
nginx/conf.d/local.conf
View file @
ccac8be2
...
...
@@ -16,6 +16,6 @@ server {
location
/
static
/ {
autoindex
on
;
alias
/
srv
/
static
/;
alias
/
srv
/
rnacentral
/
static
/;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment