deployment

This commit is contained in:
qiaofeng1227 2023-09-19 16:36:28 +08:00
parent 1885f0bbb3
commit 009865a9ea
3 changed files with 2 additions and 2 deletions

View file

@ -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"]

View file

@ -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

View file

@ -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()
}