Commit 65893741 by maxingyu

first

parent cd9308bc
...@@ -2,12 +2,10 @@ storage/mysql/* ...@@ -2,12 +2,10 @@ storage/mysql/*
storage/redis/* storage/redis/*
!storage/mysql/.gitkeep !storage/mysql/.gitkeep
!storage/redis/.gitkeep !storage/redis/.gitkeep
vue/*
!vue/.gitkeep
laravel/* laravel/*
!laravel/.gitkeep !laravel/.gitkeep
gulp/* web/*
!gulp/.gitkeep !web/.gitkeep
.c9/ .c9/
.idea/ .idea/
id_rsa id_rsa
......
server {
listen 80;
server_name c9.test;
access_log off;
location / {
proxy_pass http://localhost:8181/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
#promotion vue:npm run dev
server { server {
listen 80; listen 80;
server_name piston.test; server_name piston.test;
root /web/piston/dist;
location / {
proxy_pass http://localhost:3000/;
}
}
server {
listen 80;
server_name piston.build.test;
root /workspace/gulp/piston/dist;
index index.html index.htm index.php; index index.html index.htm index.php;
...@@ -38,11 +31,11 @@ server { ...@@ -38,11 +31,11 @@ server {
location ~ \.php$ { location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock; fastcgi_pass php56:9000;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /topka/public/$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }
...@@ -50,7 +43,7 @@ server { ...@@ -50,7 +43,7 @@ server {
server { server {
listen 80; listen 80;
server_name vue.dealer.test; server_name vue.dealer.test;
root /workspace/vue/dealer/dist; root /web/dealer/dist;
index index.html; index index.html;
...@@ -96,8 +89,8 @@ server { ...@@ -96,8 +89,8 @@ server {
listen 80; listen 80;
listen 443; listen 443;
server_name layui.test; server_name layui.test;
root /workspace/vue/layui-agent/start; root /web/layui-agent/start;
#root /data/git/piston/dist;
index index.html index.htm; index index.html index.htm;
access_log /var/log/nginx/layui-agent.access.log; access_log /var/log/nginx/layui-agent.access.log;
...@@ -111,11 +104,11 @@ server { ...@@ -111,11 +104,11 @@ server {
location /src/ { location /src/ {
alias /workspace/vue/layui-agent/src/; alias /web/layui-agent/src/;
} }
location /dist/ { location /dist/ {
alias /workspace/vue/layui-agent/dist/; alias /web/layui-agent/dist/;
} }
location /master/ { location /master/ {
...@@ -125,25 +118,10 @@ server { ...@@ -125,25 +118,10 @@ server {
server { server {
listen 80; listen 80;
server_name promotion.build.test;
root /workspace/vue/promotion/dist;
index index.html;
access_log /var/log/nginx/promotion.build.access.log;
error_log /var/log/nginx/promotion.build.error.log;
location / {
try_files $uri /index.html?$query_string;
}
}
server {
listen 80;
listen 443; listen 443;
server_name provider.test; server_name provider.test;
root /workspace/vue/layui-provider/start; root /web/layui-provider/start;
#root /data/git/piston/dist;
index index.html index.htm; index index.html index.htm;
access_log /var/log/nginx/layui-agent.access.log; access_log /var/log/nginx/layui-agent.access.log;
...@@ -157,11 +135,11 @@ server { ...@@ -157,11 +135,11 @@ server {
location /src/ { location /src/ {
alias /workspace/vue/layui-provider/src/; alias /web/layui-provider/src/;
} }
location /dist/ { location /dist/ {
alias /workspace/vue/layui-provider/dist/; alias /web/layui-provider/dist/;
} }
location /provider/ { location /provider/ {
......
server { server {
listen 80; listen 80;
server_name dealer.test; server_name dealer.test;
root /workspace/laravel/dealer/public;
add_header X-Frame-Options "SAMEORIGIN"; add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff"; add_header X-Content-Type-Options "nosniff";
...@@ -20,8 +19,8 @@ server { ...@@ -20,8 +19,8 @@ server {
error_page 404 /index.php; error_page 404 /index.php;
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; fastcgi_pass php71:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /dealer/public/$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
...@@ -33,7 +32,8 @@ server { ...@@ -33,7 +32,8 @@ server {
server { server {
listen 80; listen 80;
server_name promotion.test; server_name promotion.test;
root /workspace/laravel/promotion/public; root /laravel/promotion/public;
client_max_body_size 1024m;
add_header X-Frame-Options "SAMEORIGIN"; add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff"; add_header X-Content-Type-Options "nosniff";
...@@ -52,8 +52,8 @@ server { ...@@ -52,8 +52,8 @@ server {
error_page 404 /index.php; error_page 404 /index.php;
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; fastcgi_pass php71:9000;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /promotion/public/$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
...@@ -66,7 +66,7 @@ server { ...@@ -66,7 +66,7 @@ server {
listen 80; listen 80;
keepalive_timeout 60; keepalive_timeout 60;
server_name sosocar.test; server_name sosocar.test;
root /workspace/laravel/topka/public; root /laravel/topka/public;
location / { location / {
if (!-e $request_filename) { if (!-e $request_filename) {
...@@ -89,9 +89,9 @@ server { ...@@ -89,9 +89,9 @@ server {
proxy_pass http://api.sosocar.cn; proxy_pass http://api.sosocar.cn;
} }
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock; fastcgi_pass php56:9000;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /topka/public/$fastcgi_script_name;
include fastcgi_params; include fastcgi_params;
} }
} }
...@@ -2,58 +2,77 @@ version: '3.5' ...@@ -2,58 +2,77 @@ version: '3.5'
services: services:
workspace: nginx:
container_name: workspace image: nginx:alpine
image: cnice/4wheels-devops:1.0.4 restart: always
networks: volumes:
- wb_net - ./config/nginx:/etc/nginx/conf.d
- ./logs/nginx:/var/log/nginx
- ./web:/web
- ./laravel:/laravel
ports: ports:
- 80:80 - 80:80
- 443:443
php56:
image: cnice/4wheels-php56:latest
restart: always
volumes:
- './laravel/topka:/topka'
hostname: local
links:
- dbm
- dbr
- memcached
- beanstalkd
php71:
image: cnice/4wheels-php71:latest
restart: always
volumes: volumes:
- '.:/workspace' - './laravel/dealer:/dealer'
- './laravel/promotion:/promotion'
hostname: local hostname: local
links:
- dbm
- dbr
- memcached
- beanstalkd
mysql.test: dbm:
container_name: mysql
image: mysql:5.5 image: mysql:5.5
networks: restart: always
- wb_net
environment: environment:
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: topka2012
volumes: volumes:
- './storage/mysql:/var/lib/mysql' - './storage/mysql:/var/lib/mysql'
# - './my.cnf:/etc/mysql/my.cnf'
ports: ports:
- 3306:3306 - 3306:3306
hostname: mysql
redis.test: dbr:
container_name: redis
image: redis:alpine image: redis:alpine
networks:
- wb_net
volumes: volumes:
- './storage/redis:/data' - './storage/redis:/data'
restart: always
ports: ports:
- 6379:6379 - 6379:6379
command: redis-server --appendonly yes command: redis-server --requirepass topka2012 --appendonly yes
hostname: redis
dns: dns:
container_name: dns
image: jpillora/dnsmasq image: jpillora/dnsmasq
networks: restart: always
- wb_net
ports: ports:
- 53:53/udp - 53:53/udp
- 5380:8080 - 5380:8080
volumes: volumes:
- './dns/dnsmasq.conf:/etc/dnsmasq.conf' - './config/dns/dnsmasq.conf:/etc/dnsmasq.conf'
memcached:
networks: image: memcached:alpine3.14
wb_net: restart: always
name: wb_net ports:
ipam: - 11211:11211
driver: default beanstalkd:
config: image: schickling/beanstalkd
- subnet: "172.29.233.0/24" restart: always
ports:
- 11300:11300
nginx/*
!nginx/.gitkeep
\ No newline at end of file
# Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# The MySQL Server configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
secure-file-priv= NULL
default_authentication_plugin=mysql_native_password
# Custom config should go here
!includedir /etc/mysql/conf.d/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment