fix copy command
This commit is contained in:
parent
bdae13d993
commit
f5a52c980a
3 changed files with 8 additions and 4 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -104,4 +104,5 @@ dist
|
|||
.tern-port
|
||||
|
||||
src/temp
|
||||
src/build
|
||||
src/build
|
||||
src/data
|
|
@ -1,7 +1,7 @@
|
|||
services:
|
||||
magma:
|
||||
container_name: magma
|
||||
image: help14/magma
|
||||
image: magma
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/:/app/data
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
|
@ -22,9 +23,11 @@ var websiteData = struct {
|
|||
|
||||
func main() {
|
||||
pwd, _ = os.Getwd()
|
||||
modules.CopyDirectory("./common", "./data")
|
||||
appConfig = modules.LoadConfig()
|
||||
|
||||
exec.Command("mkdir", "-p", "./data").Run()
|
||||
exec.Command("cp", "--recursive", "./common/*", "./data/").Run()
|
||||
|
||||
appConfig = modules.LoadConfig()
|
||||
websiteData.Config = appConfig.Website
|
||||
websiteData.Language = modules.LoadLanguage(appConfig.Website.Language)
|
||||
websiteData.Contents = modules.LoadContent().Data
|
||||
|
|
Loading…
Add table
Reference in a new issue