Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ISRIC
wsm.rest
Commits
ccdd53e5
Commit
ccdd53e5
authored
Dec 06, 2017
by
Luís de Sousa
Browse files
Correcting launching processes in startup script.
parent
2dc13455
Changes
1
Show whitespace changes
Inline
Side-by-side
configs/startup.sh
View file @
ccdd53e5
#!/bin/bash
# Create socket for Gunicorn
touch
/var/www/wsm.rest/wsm.rest.sock
chown
www-data:www-data /var/www/wsm.rest/wsm.rest.sock
# Launch Gunicorn
exec
/usr/local/bin/gunicorn wsgi:app
\
--workers
3
\
--bind
unix:wsm.rest.sock
\
-m
007
cd
/var/www/wsm.rest
mkdir
logs
echo
"Launching Gunicorn..."
nohup
/usr/local/bin/gunicorn wsgi:app
--workers
3
--bind
unix:wsm.rest.sock
-m
007 </dev/null
>
logs/gunicorn.log 2>&1 &
# Remove default site from nginx
echo
"Setting up nginx config."
rm
/etc/nginx/sites-enabled/default
cp
/var/www/wsm.rest/configs/wsm.rest.nginx /etc/nginx/sites-enabled/wsm.rest
echo
"Launching nginx..."
nohup
nginx </dev/null
>
logs/nginx.log 2>&1 &
# Launch neginx
exec
nginx
# Wait a little for Gunicorn to set up
sleep
2
echo
"Fixing access to socket."
chown
www-data:www-data /var/www/wsm.rest/wsm.rest.sock
echo
"All done. Good to go!"
Write
Preview
Supports
Markdown
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