-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kilingzhang
committed
Dec 3, 2022
1 parent
3509185
commit 146a4ee
Showing
9 changed files
with
111 additions
and
68 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
|
||
/usr/sbin/nginx | ||
|
||
cd /var/www/html/NeteaseCloudMusicApi && composer install -vvv --ignore-platform-req=ext-dom --ignore-platform-req=ext-xml --ignore-platform-req=ext-xmlwriter --ignore-platform-req=ext-tokenizer | ||
|
||
php-fpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,93 @@ | ||
user www-data; | ||
worker_processes 3; | ||
# /etc/nginx/nginx.conf | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
user www; | ||
|
||
# Set number of worker processes automatically based on number of CPU cores. | ||
worker_processes auto; | ||
|
||
# Enables the use of JIT for regular expressions to speed-up their processing. | ||
pcre_jit on; | ||
|
||
pid /var/run/nginx.pid; | ||
|
||
# Configures default error logger. | ||
error_log /var/log/nginx/error.log warn; | ||
|
||
# Includes files with directives to load dynamic modules. | ||
include /etc/nginx/modules/*.conf; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
# The maximum number of simultaneous connections that can be opened by | ||
# a worker process. | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
# Includes mapping of file name extensions to MIME types of responses | ||
# and defines the default type. | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
# Name servers used to resolve names of upstream servers into addresses. | ||
# It's also needed when using tcpsocket and udpsocket in Lua modules. | ||
#resolver 208.67.222.222 208.67.220.220; | ||
|
||
# Don't tell nginx version to clients. | ||
server_tokens off; | ||
|
||
# Specifies the maximum accepted body size of a client request, as | ||
# indicated by the request header Content-Length. If the stated content | ||
# length is greater than this size, then the client receives the HTTP | ||
# error code 413. Set to 0 to disable. | ||
client_max_body_size 1m; | ||
|
||
# Timeout for keep-alive connections. Server will close connections after | ||
# this time. | ||
keepalive_timeout 65; | ||
|
||
# Sendfile copies data between one FD and other from within the kernel, | ||
# which is more efficient than read() + write(). | ||
sendfile on; | ||
|
||
# Don't buffer data-sends (disable Nagle algorithm). | ||
# Good for sending frequent small bursts of data in real time. | ||
tcp_nodelay on; | ||
|
||
# Causes nginx to attempt to send its HTTP response head in one packet, | ||
# instead of using partial frames. | ||
#tcp_nopush on; | ||
|
||
|
||
# Path of the file with Diffie-Hellman parameters for EDH ciphers. | ||
#ssl_dhparam /etc/ssl/nginx/dh2048.pem; | ||
|
||
# Specifies that our cipher suits should be preferred over client ciphers. | ||
ssl_prefer_server_ciphers on; | ||
|
||
# Enables a shared SSL cache with size that can hold around 8000 sessions. | ||
ssl_session_cache shared:SSL:2m; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
# Enable gzipping of responses. | ||
#gzip on; | ||
|
||
sendfile on; | ||
#tcp_nopush on; | ||
# Set the Vary HTTP header as defined in the RFC 2616. | ||
gzip_vary on; | ||
|
||
keepalive_timeout 65; | ||
# Enable checking the existence of precompressed files. | ||
#gzip_static on; | ||
|
||
gzip on; | ||
|
||
server { | ||
listen 80; | ||
root /var/www/html; | ||
index index.php index.html; | ||
# Specifies the main log format. | ||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
# Sets the path, format, and configuration for a buffered log write. | ||
access_log /var/log/nginx/access.log main; | ||
|
||
location ~ \.php$ { | ||
fastcgi_pass 127.0.0.1:9000; | ||
fastcgi_index index.php; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
include fastcgi_params; | ||
} | ||
} | ||
|
||
include conf.d/* ; | ||
# Includes virtual hosts configs. | ||
include /etc/nginx/conf.d/*.conf; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker build -t kilingzhang/netease-cloud-music-api:dev . | ||
docker stop netease_cloud_music_api_container | ||
docker rm netease_cloud_music_api_container | ||
docker rmi kilingzhang/netease-cloud-music-api:dev | ||
|
||
docker stop php_container | ||
docker rm php_container | ||
docker build -t kilingzhang/netease-cloud-music-api:dev . | ||
|
||
docker run -itd --name=php_container \ | ||
-p 80:80 \ | ||
kilingzhang/netease-cloud-music-api:dev | ||
docker run -itd --name=netease_cloud_music_api_container \ | ||
-p 80:80 \ | ||
-v $(pwd):/var/www/html/NeteaseCloudMusicApi \ | ||
kilingzhang/netease-cloud-music-api:dev | ||
|
||
#docker run -itd --name=php_container \ | ||
#-p 80:80 \ | ||
#-v /Users/kilingzhang/Code/NeteaseCloudMusicApi-php:/var/www/html/NeteaseCloudMusicApi \ | ||
#kilingzhang/netease-cloud-music-api:dev | ||
|
||
docker exec -it php_container sh | ||
docker exec -it netease_cloud_music_api_container sh |
This file was deleted.
Oops, something went wrong.