mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 15:40:22 +00:00
deployment
This commit is contained in:
parent
1885f0bbb3
commit
009865a9ea
3 changed files with 2 additions and 2 deletions
|
@ -10,5 +10,4 @@ FROM portainer/portainer-ce:2.19.0
|
|||
LABEL maintainer="websoft9<help@websoft9.com>"
|
||||
LABEL version="2.19.0"
|
||||
COPY --from=builder /init_portainer /
|
||||
|
||||
ENTRYPOINT ["/init_portainer"]
|
|
@ -6,7 +6,6 @@ services:
|
|||
portainer:
|
||||
container_name: websoft9-deployment
|
||||
image: websoft9dev/deployment:2.19.0
|
||||
entrypoint: ["/init_portainer"]
|
||||
restart: always
|
||||
ports:
|
||||
- 9001-9999:9000
|
||||
|
|
|
@ -32,6 +32,7 @@ func main() {
|
|||
|
||||
_, err := os.Stat(filePath)
|
||||
if os.IsNotExist(err) {
|
||||
fmt.Println("credential is not exist, create it.")
|
||||
password := generatePassword(16)
|
||||
|
||||
err := writeToFile(filePath, password)
|
||||
|
@ -40,6 +41,7 @@ func main() {
|
|||
return
|
||||
}
|
||||
}else{
|
||||
fmt.Println("credential is exist, skip it.")
|
||||
cmd := exec.Command("./portainer")
|
||||
cmd.Run()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue