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