master
pan 4 years ago
commit 303ffad195
  1. 50
      .env
  2. 21
      docker-compose.yml
  3. 29
      site.conf

50
.env

@ -0,0 +1,50 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:yexCATmnxqIQ8fIw1CAvrj7RS9LDsoRPGGDn1ybHnNo=
APP_DEBUG=true
APP_URL=https://risk.kirito.cool
LOG_CHANNEL=stack
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=123456
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
TIME_ZOME=PRC
DB_TIMEZONE=+08:00

@ -0,0 +1,21 @@
version: '3.8'
services:
web:
image: nginx:1.19.5-alpine
ports: ['80:80']
volumes: ['data-volume:/RiskCloudBackend', './site.conf:/etc/nginx/conf.d/site.conf']
links: [php, nodejs]
php:
build: ./risk_cloud_backend
volumes: ['data-volume:/RiskCloudBackend']
links: [mysql]
working_dir: /RiskCloudBackend
volumes: ['./.env:/RiskCloudBackend/.env']
nodejs:
build: ./risk_cloud_fontend
working_dir: /RiskCloudFontend
mysql:
image: mysql:8.0.22
environment: {TZ: Asia/Shanghai,MYSQL_ROOT_PASSWORD: 123456,MYSQL_DATABASE: laravel}
volumes:
data-volume:

@ -0,0 +1,29 @@
server {
index index.php index.html;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /code/public;
location / {
proxy_pass http://nodejs:3000;
}
location ~ /api{
try_files $uri $uri/ /index.php?$query_string;
}
location ~ /storage {
root /code/public/;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
Loading…
Cancel
Save