容器部署支持管理后台访问

pull/26/merge
isummer 2 years ago
parent a7a1472533
commit 4d98981485
  1. 3
      docker.md
  2. 2
      docker/flyapps/docker-compose.yml
  3. 2
      docker/init/clean.sh
  4. 3
      docker/init/init.sh
  5. 2
      fir_admin/src/views/login/index.vue
  6. 41
      nginx.conf.d/flyapps-vhost.conf

@ -71,4 +71,5 @@ docker exec -it flyapps python manage.py createsuperuser
```
##### 测试访问
在浏览器输入自己配置的域名 https://app.hehelucky.cn/ 进行访问
- 在浏览器输入自己配置的域名 https://app.hehelucky.cn/ 进行访问
- 管理后台访问 https://app.hehelucky.cn:3448/ 进行访问

@ -34,12 +34,14 @@ services:
- /etc/localtime:/etc/localtime:ro
- ../../data/web:/data
- ../../nginx.conf.d:/etc/nginx/conf.d
- ../../data/logs/nginx:/var/log/nginx
networks:
flyapps:
ipv4_address: 172.31.31.200
ports:
- 80:80
- 443:443
- 3448:3448
external_links:
- flyapps:flyapps
depends_on:

@ -2,7 +2,7 @@
#
#
for i in nginx flyapps mariadb redis buildclient buildshort buildadmin;do echo $i;docker rm -f $i;done
for i in nginx flyapps mariadb redis buildclient buildshort buildadmin build-buildflyapps-1;do echo $i;docker rm -f $i;done
docker network rm flyapps

@ -14,7 +14,8 @@ if [ $? -ne 0 ];then
fi
data_path="$(dirname $(dirname `pwd`))/data"
mkdir -pv ${data_path}/{flyapps,web,mariadb,redis,logs/{mariadb,nginx,flyapps}}
mkdir -pv ${data_path}/{flyapps/files,web,mariadb,redis,logs/{mariadb,nginx,flyapps}}
\cp $(dirname $(dirname `pwd`))/fir_ser/files/head_img.jpeg ${data_path}/flyapps/files/
chown 1001.1001 -R ${data_path}/{flyapps,web,mariadb,redis,logs/{mariadb,nginx,flyapps}}
systemctl start docker && docker network create flyapps --driver bridge --subnet=172.31.31.0/24
systemctl enable docker

@ -66,7 +66,7 @@ export default {
}
}
const validatePassword = (rule, value, callback) => {
if (value.length < 6) {
if (value.length < 3) {
callback(new Error('The password can not be less than 6 digits'))
} else {
callback()

@ -71,4 +71,45 @@ server
error_log off;
access_log /dev/null;
}
access_log /var/log/nginx/flyapps_access.log;
error_log /var/log/nginx/flyapps_error.log;
}
server
{
listen 3448 ssl http2;
server_name app.hehelucky.cn;
index index.html index.htm default.htm default.html;
root /data/fir_admin;
ssl_certificate /etc/nginx/conf.d/app.hehelucky.cn.pem;
ssl_certificate_key /etc/nginx/conf.d/app.hehelucky.cn.key;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
error_page 497 https://$host$request_uri;
location ~ ^/(api|flower) {
uwsgi_send_timeout 300; # 指定向uWSGI传送请求的超时时间,完成握手后向uWSGI传送请求的超时时间。
uwsgi_connect_timeout 300; # 指定连接到后端uWSGI的超时时间。
uwsgi_read_timeout 300; # 指定接收uWSGI应答的超时时间,完成握手后接收uWSGI应答的超时时间。
include uwsgi_params;
uwsgi_pass flyapps:8898;
uwsgi_param UWSGI_SCRIPT wsgi;
}
location / {
}
access_log /var/log/nginx/fadmin_access.log;
error_log /var/log/nginx/fadmin_error.log;
}

Loading…
Cancel
Save