Skip to content

Commit

Permalink
Fix the screwed port number in Nginx config and enable sudo-less dock…
Browse files Browse the repository at this point in the history
…er commands in Sonatype Nexus Repository (QubitPi#22)
  • Loading branch information
QubitPi committed Jun 22, 2024
1 parent dacdb93 commit f0b70dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions provisioner/sonatype-nexus-repository/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

// PORT Default port of Sonatype Nexus
const PORT int = 8081
const PORT string = "8081"

type Config struct {
SslCertBase64 string `mapstructure:"sslCertBase64" required:"true"`
Expand Down Expand Up @@ -58,6 +58,7 @@ func getCommands(homeDir string) []string {

"curl -fsSL https://get.docker.com -o get-docker.sh",
"sh get-docker.sh",
"sudo usermod -aG docker ${USER}",

"docker volume create --name nexus-data",

Expand All @@ -74,7 +75,7 @@ func getNginxConfig(domain string) string {
SslCertPath string
SslCertKeyPath string
Port string
}{domain, sslProvisioner.SSL_CERT_PATH, sslProvisioner.SSL_CERT_KEY_PATH, string(rune(PORT))}
}{domain, sslProvisioner.SSL_CERT_PATH, sslProvisioner.SSL_CERT_KEY_PATH, PORT}
var buf bytes.Buffer
t := template.Must(template.New("Nginx Config").Parse(`
server {
Expand Down

0 comments on commit f0b70dc

Please sign in to comment.