Skip to content

Instantly share code, notes, and snippets.

@chrisdpeters
Last active August 10, 2017 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdpeters/c6b420443e146b9592ea to your computer and use it in GitHub Desktop.
Save chrisdpeters/c6b420443e146b9592ea to your computer and use it in GitHub Desktop.
<cfoutput>
<!--- Instead of a lame check like `<cfif get("environment") eq "production">`,
we can instead do whatever the environment is calling for --->
<cfif
StructKeyExists(server.ENV, "GOOGLE_ANALYTICS_TRACKING_CODE")
and Len(server.ENV.GOOGLE_ANALYTICS_TRACKING_CODE)
>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '#server.ENV.GOOGLE_ANALYTICS_TRACKING_CODE#', 'example.com');
ga('send', 'pageview');
</script>
</cfif>
</cfoutput>
<cfscript>
// Setup environment variables.
server.ENV = CreateObject("java", "java.lang.System").getenv();
// Setup data source.
this.DataSources["www"] = {
type=server.ENV.DB_TYPE,
host=server.ENV.DB_HOST,
port=server.ENV.DB_PORT,
database=server.ENV.DB_DATABASE,
username=server.ENV.DB_USERNAME,
password=server.ENV.DB_PASSWORD
};
</cfscript>
$ docker-compose build
web:
build: .
command: ./start.sh
ports:
- "3000:80"
volumes:
- ./app/:/var/www/
environment:
WHEELS_ENV: design
WHEELS_RELOAD_PW:
DB_TYPE:
DB_HOST:
DB_PORT:
DB_DATABASE:
DB_USERNAME:
DB_PASSWORD:
SMTP_SERVER:
SMTP_PORT:
SMTP_USESSL:
SMTP_USETLS:
SMTP_SIGN:
SMTP_USERNAME:
SMTP_PASSWORD:
SMTP_BCC:
SMTP_CHARSET:
SMTP_TIMEOUT:
SMTP_FAILTO:
SMTP_KEYSTORE:
SMTP_KEYSTOREPASSWORD:
SMTP_KEYALIAS:
SMTP_KEYPASSWORD:
$ ipconfig getifaddr en1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment