Remove extra environment
This commit is contained in:
parent
5ee878c30e
commit
d8347c3976
|
@ -712,9 +712,8 @@ func main() {
|
|||
}
|
||||
|
||||
func runServer(environment string, server *gin.Engine) {
|
||||
if environment == "local" || environment == "proxy" {
|
||||
server.Run(":8080")
|
||||
} else {
|
||||
useTLS := viper.GetBool("http.use_tls")
|
||||
if useTLS {
|
||||
certPath, err := config.CredentialFilePath("tls.cert")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -726,6 +725,8 @@ func runServer(environment string, server *gin.Engine) {
|
|||
}
|
||||
|
||||
log.Fatal(server.RunTLS(":443", certPath, keyPath))
|
||||
} else {
|
||||
server.Run(":8080")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,12 @@
|
|||
# It must be specified if running in a non-local environment.
|
||||
log-file: ""
|
||||
|
||||
# HTTP connection parameters
|
||||
http:
|
||||
# If true, bind to 443 and use TLS.
|
||||
# By default, this is false, and museum will bind to 8080 without TLS.
|
||||
# use_tls: true
|
||||
|
||||
# Database connection parameters
|
||||
db:
|
||||
host: localhost
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
log-file: /var/logs/museum.log
|
||||
|
||||
http:
|
||||
use_tls: true
|
||||
|
||||
stripe:
|
||||
path:
|
||||
success: ?status=success&session_id={CHECKOUT_SESSION_ID}
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# Production setup when running behind a reverse proxy like Nginx
|
||||
#
|
||||
# - TLS terminates on Nginx not on us
|
||||
# - Otherwise the same as `production.yaml`
|
||||
|
||||
log-file: /var/logs/museum.log
|
||||
|
||||
stripe:
|
||||
path:
|
||||
success: ?status=success&session_id={CHECKOUT_SESSION_ID}
|
||||
cancel: ?status=fail&reason=canceled
|
|
@ -10,7 +10,8 @@ ExecStartPre=docker pull rg.fr-par.scw.cloud/ente/museum-prod
|
|||
ExecStartPre=-docker stop museum
|
||||
ExecStartPre=-docker rm museum
|
||||
ExecStart=docker run --name museum \
|
||||
-e ENVIRONMENT=proxy \
|
||||
-e ENVIRONMENT=production \
|
||||
-e ENTE_HTTP-USE_TLS=0 \
|
||||
--hostname "%H" \
|
||||
-p 8080:8080 \
|
||||
-p 2112:2112 \
|
||||
|
|
Loading…
Reference in a new issue