How to override the alfresco-global.properties in dev, staging and prod environments

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

How to override the alfresco-global.properties in dev, staging and prod environments

Im trying to set up a dev, staging, prod environment so I've set up a git repo and committed the alfresco-global.properties file and then deployed the repository to the dev, staging and prod servers.


Is there a way to override this file so that dev, staging and prod can have some similar settings (e.g authentication subsystems) while others are overridden (e.g. database connections)?

Thanks in advance

3 Replies
Highlighted
Senior Member II

Re: How to override the alfresco-global.properties in dev, staging and prod environments

Environment specific configuration should be specified inside below file.

tomcat/shared/classes/alfresco-global.properties.

Above file is loaded last , so it will override all configuration which is specified in above file.

Highlighted
Active Member II

Re: How to override the alfresco-global.properties in dev, staging and prod environments

Where is the best place for me to add the below settings so that I can override them for site specific settings using tomcat/shared/classes/alfresco-global.properties?

dir.root

alfresco.host

share.host

db.username
db.password
db.password

system.serverMode

system.usages.enabled

alfresco_user_store.adminpassword

solr.host
solr.port.ssl
index.subsystem.name
solr.secureComms
solr.port
solr.base.url

aos.baseUrlOverwrite

mail.host
mail.port
mail.username
mail.password
mail.encoding
mail.from.default
mail.smtp.auth

email.inbound.enabled

email.server.enabled
email.server.port
email.server.domain

imap.server.host
imap.server.imaps.enabled
imap.server.imaps.port

cifs.serverName

Highlighted
Advanced

Re: How to override the alfresco-global.properties in dev, staging and prod environments

Hi:

You can override specific environment properties via JAVA_OPTS too (for example in setenv.sh or init scripts), adding those properties as java variables with -D (this is similar what docker compose is using for environment).

Kind regards.

--C.