init
This commit is contained in:
commit
807f103f34
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
ddddocr-fastapi/
|
||||
mongodb/database/
|
||||
playwright-reports/
|
||||
playwright/html/
|
19
mongodb/docker-compose.yml
Normal file
19
mongodb/docker-compose.yml
Normal file
@ -0,0 +1,19 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mongodb:
|
||||
image: mongo:latest
|
||||
container_name: mongodb
|
||||
restart: always
|
||||
ports:
|
||||
- "27017:27017"
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: automentAdmin
|
||||
MONGO_INITDB_ROOT_PASSWORD: nimatnemotua
|
||||
MONGO_INITDB_DATABASE: automentdb
|
||||
TZ: Asia/Taipei
|
||||
volumes:
|
||||
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
||||
- ./database/configdb:/data/configdb
|
||||
- ./database/data:/data/db
|
||||
- ./mongod.conf:/etc/mongo/mongod.conf
|
11
mongodb/mongo-init.js
Normal file
11
mongodb/mongo-init.js
Normal file
@ -0,0 +1,11 @@
|
||||
//db = db.getSiblingDB('automentdb')
|
||||
db.createUser({
|
||||
user: "user1",
|
||||
pwd: "user1",
|
||||
roles: [
|
||||
{
|
||||
role: "readWrite",
|
||||
db: "automentdb",
|
||||
},
|
||||
],
|
||||
});
|
0
mongodb/mongod.conf
Normal file
0
mongodb/mongod.conf
Normal file
10
mongodb/readme.md
Normal file
10
mongodb/readme.md
Normal file
@ -0,0 +1,10 @@
|
||||
# MongoDB
|
||||
|
||||
## 参考建置资料
|
||||
|
||||
https://medium.com/@evanfang.hi/%E4%BD%BF%E7%94%A8-docker-compose-%E5%95%9F%E5%8B%95-mongodb-dc8f5cc997dd
|
||||
|
||||
## 执行与停止
|
||||
|
||||
* 第一次执行 ```docker-compose up --build -d mongodb``` 就会执行mongo-init.js
|
||||
*
|
35
nginx/conf/nginx.conf
Normal file
35
nginx/conf/nginx.conf
Normal file
@ -0,0 +1,35 @@
|
||||
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
charset utf-8;
|
||||
default_type application/octet-stream;
|
||||
|
||||
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;
|
||||
|
||||
# sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
autoindex on;
|
||||
autoindex_exact_size on;
|
||||
autoindex_format html;
|
||||
autoindex_localtime on;
|
||||
#gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
15
nginx/docker-compose.yml
Normal file
15
nginx/docker-compose.yml
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
services:
|
||||
web:
|
||||
image: nginx
|
||||
container_name: playwrightReports
|
||||
volumes:
|
||||
- ./conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./vhost:/etc/nginx/conf.d/vhost
|
||||
- ./playwright-reports:/usr/share/nginx/html/playwright-reports
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
- NGINX_PORT=80
|
||||
- TZ=Asia/Taipei
|
12
nginx/vhost/playwright.conf
Normal file
12
nginx/vhost/playwright.conf
Normal file
@ -0,0 +1,12 @@
|
||||
server
|
||||
{
|
||||
listen 80;
|
||||
charset utf-8;
|
||||
root /usr/share/nginx/html/;
|
||||
index index.html;
|
||||
location /playwright-reports {
|
||||
autoindex on;
|
||||
|
||||
}
|
||||
access_log off;
|
||||
}
|
Loading…
Reference in New Issue
Block a user