forked from lifei825/devops-flask-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
27 lines (21 loc) · 725 Bytes
/
entrypoint.sh
File metadata and controls
27 lines (21 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
cd /app && python manage.py create_user
# Get the maximum upload file size for Nginx, default to 0: unlimited
USE_NGINX_MAX_UPLOAD=${NGINX_MAX_UPLOAD:-0}
# Generate Nginx config for maximum upload file size
echo "client_max_body_size $USE_NGINX_MAX_UPLOAD;" > /etc/nginx/conf.d/upload.conf
# Generate Nginx config first part using the environment variables
echo 'server {
location / {
include uwsgi_params;
uwsgi_pass unix:///tmp/uwsgi.sock;
}
location ~/static/ {
root /app/vue-init/dist;
index index.html index.htm;
}
'> /etc/nginx/conf.d/nginx.conf
# Finish the Nginx config file
echo "}" >> /etc/nginx/conf.d/nginx.conf
exec "$@"