feat: add local docker development stack
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /likeadmin_php/server/public;
|
||||
index index.html index.htm index.php;
|
||||
client_max_body_size 20M;
|
||||
|
||||
access_log /logs/sport-era-dev_access.log;
|
||||
error_log /logs/sport-era-dev_error.log;
|
||||
|
||||
location / {
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^/(.*)$ /index.php?s=$1 last;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass server:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /likeadmin_php/server/public$fastcgi_script_name;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
name: sport-era-dev
|
||||
|
||||
services:
|
||||
server:
|
||||
image: registry.cn-guangzhou.aliyuncs.com/likeadmin/php:8.0.30.3-fpm
|
||||
working_dir: /likeadmin_php/server
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ../server:/likeadmin_php/server
|
||||
networks:
|
||||
- sport-era-dev
|
||||
|
||||
nginx:
|
||||
image: registry.cn-guangzhou.aliyuncs.com/likeadmin/nginx:1.23.1
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- server
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- ../server:/likeadmin_php/server:ro
|
||||
- ./config/nginx/conf.d/sport-era.dev.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- ./log/nginx/dev-logs:/logs
|
||||
networks:
|
||||
- sport-era-dev
|
||||
|
||||
admin:
|
||||
image: node:20-alpine
|
||||
working_dir: /app
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
CHOKIDAR_USEPOLLING: "true"
|
||||
command: >-
|
||||
sh -c "if [ ! -d node_modules/vite ]; then npm install --package-lock=false; fi;
|
||||
npm run dev"
|
||||
ports:
|
||||
- "5176:5176"
|
||||
volumes:
|
||||
- ../admin:/app
|
||||
- admin-node-modules:/app/node_modules
|
||||
networks:
|
||||
- sport-era-dev
|
||||
|
||||
uniapp-h5:
|
||||
image: node:20-alpine
|
||||
working_dir: /app
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
CHOKIDAR_USEPOLLING: "true"
|
||||
command: >-
|
||||
sh -c "if [ ! -x node_modules/.bin/uni ]; then npm install --legacy-peer-deps --package-lock=false; fi;
|
||||
npm run dev:h5 -- --host 0.0.0.0"
|
||||
ports:
|
||||
- "5177:5177"
|
||||
volumes:
|
||||
- ../uniapp:/app
|
||||
- uniapp-node-modules:/app/node_modules
|
||||
networks:
|
||||
- sport-era-dev
|
||||
|
||||
volumes:
|
||||
admin-node-modules:
|
||||
uniapp-node-modules:
|
||||
|
||||
networks:
|
||||
sport-era-dev:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user