fix(be):add playground & change log dir
This commit is contained in:
parent
df47f8c323
commit
2a7538bb70
22
.gitignore
vendored
22
.gitignore
vendored
@ -4,4 +4,24 @@ web/build
|
||||
*.db
|
||||
.DS_Store
|
||||
.eslintcache
|
||||
.env
|
||||
.env
|
||||
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# ignore ide config
|
||||
.idea
|
||||
.vscode
|
||||
|
||||
# vim
|
||||
*.swp
|
||||
|
||||
|
||||
# playground
|
||||
playground/next-terminal
|
||||
|
||||
/log
|
2
main.go
2
main.go
@ -45,7 +45,7 @@ func Run() error {
|
||||
|
||||
writer1 := &bytes.Buffer{}
|
||||
writer2 := os.Stdout
|
||||
writer3, err := os.OpenFile("next-terminal.log", os.O_WRONLY|os.O_CREATE, 0755)
|
||||
writer3, err := os.OpenFile("log/next-terminal.log", os.O_WRONLY|os.O_CREATE, 0755)
|
||||
if err != nil {
|
||||
log.Fatalf("create file log.txt failed: %v", err)
|
||||
}
|
||||
|
49
playground/docker-compose.yml
Normal file
49
playground/docker-compose.yml
Normal file
@ -0,0 +1,49 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: mysql
|
||||
environment:
|
||||
MYSQL_DATABASE: next-terminal
|
||||
MYSQL_USER: next-terminal
|
||||
MYSQL_PASSWORD: next-terminal
|
||||
MYSQL_ROOT_PASSWORD: next-terminal
|
||||
volumes:
|
||||
- ./data/mysql_data:/var/lib/mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
restart:
|
||||
always
|
||||
networks:
|
||||
next-terminal:
|
||||
ipv4_address: 172.77.77.2
|
||||
|
||||
next-terminal:
|
||||
container_name: next-terminal
|
||||
image: "dushixiang/next-terminal:latest"
|
||||
environment:
|
||||
DB: "mysql"
|
||||
MYSQL_HOSTNAME: "mysql"
|
||||
MYSQL_PORT: 3306
|
||||
MYSQL_USERNAME: "next-terminal"
|
||||
MYSQL_PASSWORD: "next-terminal"
|
||||
MYSQL_DATABASE: "next-terminal"
|
||||
ports:
|
||||
- "8088:8088"
|
||||
volumes:
|
||||
- ./drive:/usr/local/next-terminal/drive
|
||||
- ./recording:/usr/local/next-terminal/recording
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
next-terminal:
|
||||
ipv4_address: 172.77.77.3
|
||||
restart:
|
||||
always
|
||||
|
||||
networks:
|
||||
next-terminal:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: "172.77.77.0/24"
|
Loading…
Reference in New Issue
Block a user