Example Mura configurations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
if (ListFindNoCase('review,production', request.muraSysEnv.MURA_ENVIRONMENT)) { | |
this.mailservers =[ | |
{ | |
host: 'outbox.{yourdomain}.com' | |
, port: 587 | |
, username: '{username}' | |
, password: '{password}' | |
, ssl: false | |
, tls: true | |
, lifeTimespan: createTimeSpan(0,0,1,0) | |
, idleTimespan: createTimeSpan(0,0,0,10) | |
} | |
]; | |
} else { | |
this.mailservers =[ | |
{ | |
host: 'mailcatcher' | |
, port: 1025 | |
, username: '' | |
, password: '' | |
, ssl: false | |
, tls: true | |
, lifeTimespan: createTimeSpan(0,0,1,0) | |
, idleTimespan: createTimeSpan(0,0,0,10) | |
} | |
]; | |
} | |
this.ramBase = { | |
class: 'lucee.runtime.cache.ram.RamCache' | |
, storage: false | |
, custom: { | |
"timeToIdleSeconds":"3600", | |
"timeToLiveSeconds":"10800" | |
} | |
, default: '' | |
}; | |
//This must be done per site | |
this.cache.connections["default-data"] = duplicate(this.ramBase); | |
this.cache.connections["default-output"] = duplicate(this.ramBase); | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /tmp/ levels=1:2 keys_zone=s3_cache:10m max_size=1500m inactive=60m use_temp_path=off; | |
server { | |
listen 80 default_server; | |
server_name web; | |
index index.cfm index.html index.htm; | |
root /usr/share/nginx/html; | |
server_name_in_redirect off; | |
set $s3 "s3host"; | |
set $bucket "s3bucket"; | |
set $proxy "proxyhost"; | |
location ~* ^/sites/([^/]+/(assets|cache)/.+[.]svg) { | |
try_files $uri @s3svg; | |
} | |
location ~* ^/sites/([^/]+/(assets|cache)/.+[.].+) { | |
try_files $uri @s3; | |
} | |
location / { | |
try_files $uri @proxy; | |
client_max_body_size 2000m; | |
} | |
location @s3svg { | |
types { } default_type "image/svg+xml"; | |
resolver 8.8.8.8; | |
proxy_pass http://$s3/$bucket/$1; | |
proxy_intercept_errors on; | |
proxy_redirect off; | |
proxy_set_header Host $s3; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_hide_header x-amz-id-2; | |
proxy_hide_header x-amz-request-id; | |
proxy_cache s3_cache; | |
proxy_cache_valid 200 24h; | |
proxy_cache_valid 403 15m; | |
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; | |
proxy_cache_lock on; | |
proxy_cache_bypass $http_cache_purge; | |
add_header Cache-Control "public, max-age=604800"; | |
add_header X-Cache-Status $upstream_cache_status; | |
add_header Content-Type "image/svg+xml"; | |
} | |
location @s3 { | |
resolver 8.8.8.8; | |
proxy_pass http://$s3/$bucket/$1; | |
proxy_intercept_errors on; | |
proxy_redirect off; | |
proxy_set_header Host $s3; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_hide_header x-amz-id-2; | |
proxy_hide_header x-amz-request-id; | |
proxy_cache s3_cache; | |
proxy_cache_valid 200 24h; | |
proxy_cache_valid 403 15m; | |
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; | |
proxy_cache_lock on; | |
proxy_cache_bypass $http_cache_purge; | |
add_header Cache-Control "public, max-age=604800"; | |
add_header X-Cache-Status $upstream_cache_status; | |
} | |
location @proxy { | |
resolver 127.0.0.11; | |
proxy_pass http://$proxy; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_connect_timeout 600; | |
proxy_send_timeout 600; | |
proxy_read_timeout 90m; | |
send_timeout 600; | |
client_max_body_size 2000m; | |
} | |
location ~* \.(cfm|cfc)$ { | |
resolver 127.0.0.11; | |
proxy_pass http://$proxy; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_connect_timeout 600; | |
proxy_send_timeout 600; | |
proxy_read_timeout 90m; | |
send_timeout 600; | |
client_max_body_size 2000m; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM murasoftware/mura:latest | |
MAINTAINER Matt Levine, matt.levine@getmura.com | |
ARG admin_hspw= | |
ARG web_hspw= | |
RUN sed -i "s/hspw=\"\"/hspw=\"$admin_hspw\"/" /opt/lucee/server/lucee-server/context/lucee-server.xml \ | |
&& sed -i "s/hspw=\"\"/hspw=\"$web_hspw\"/" /opt/lucee/web/lucee-web.xml.cfm | |
# Logs | |
RUN ln -sf /dev/stdout /opt/lucee/web/logs/application.log \ | |
&& ln -sf /dev/stdout /opt/lucee/web/logs/exception.log | |
# Fusion Reactor | |
RUN mkdir -p /opt/fusionreactor | |
ADD https://intergral-dl.s3.amazonaws.com/FR/Latest/fusionreactor.jar /opt/fusionreactor/fusionreactor.jar | |
ADD https://intergral-dl.s3.amazonaws.com/FR/Latest/libfrjvmti_x64.so /opt/fusionreactor/libfrjvmti_x64.so | |
# Copy Mura files | |
COPY ./app /var/www | |
# Add healthcheck | |
HEALTHCHECK --start-period=3m CMD curl --fail http://localhost:8888/?healthcheck || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /tmp/ levels=1:2 keys_zone=s3_cache:10m max_size=1500m inactive=60m use_temp_path=off; | |
server { | |
listen 80 default_server; | |
server_name web; | |
index index.cfm index.html index.htm; | |
root /usr/share/nginx/html; | |
server_name_in_redirect off; | |
set $s3 "s3host"; | |
set $bucket "s3bucket"; | |
set $proxy "proxyhost"; | |
location ~* ^/sites/([^/]+/(assets|cache)/.+[.]svg) { | |
try_files $uri @s3svg; | |
} | |
location ~* ^/sites/([^/]+/(assets|cache)/.+[.].+) { | |
try_files $uri @s3; | |
} | |
location / { | |
try_files $uri @proxy; | |
client_max_body_size 2000m; | |
} | |
location @s3svg { | |
types { } default_type "image/svg+xml"; | |
resolver 8.8.8.8; | |
proxy_pass http://$s3/$bucket/$1; | |
proxy_intercept_errors on; | |
proxy_redirect off; | |
proxy_set_header Host $s3; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_hide_header x-amz-id-2; | |
proxy_hide_header x-amz-request-id; | |
proxy_hide_header Content-Type; | |
proxy_cache s3_cache; | |
proxy_cache_valid 200 24h; | |
proxy_cache_valid 403 15m; | |
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; | |
proxy_cache_lock on; | |
proxy_cache_bypass $http_cache_purge; | |
add_header Cache-Control "public, max-age=604800"; | |
add_header X-Cache-Status $upstream_cache_status; | |
add_header Content-Type "image/svg+xml"; | |
} | |
location @s3 { | |
resolver 8.8.8.8; | |
proxy_pass http://$s3/$bucket/$1; | |
proxy_intercept_errors on; | |
proxy_redirect off; | |
proxy_set_header Host $s3; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_hide_header x-amz-id-2; | |
proxy_hide_header x-amz-request-id; | |
proxy_cache s3_cache; | |
proxy_cache_valid 200 24h; | |
proxy_cache_valid 403 15m; | |
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; | |
proxy_cache_lock on; | |
proxy_cache_bypass $http_cache_purge; | |
add_header Cache-Control "public, max-age=604800"; | |
add_header X-Cache-Status $upstream_cache_status; | |
} | |
location @proxy { | |
resolver 127.0.0.11; | |
proxy_pass http://$proxy; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Host $http_x_forwarded_host; | |
proxy_set_header X-Forwarded-Server $http_x_forwarded_server; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_connect_timeout 600; | |
proxy_send_timeout 600; | |
proxy_read_timeout 90m; | |
send_timeout 600; | |
client_max_body_size 2000m; | |
} | |
location ~* \.(cfm|cfc)$ { | |
resolver 127.0.0.11; | |
proxy_pass http://$proxy; | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Host $http_x_forwarded_host; | |
proxy_set_header X-Forwarded-Server $http_x_forwarded_server; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_connect_timeout 600; | |
proxy_send_timeout 600; | |
proxy_read_timeout 90m; | |
send_timeout 600; | |
client_max_body_size 2000m; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
#Mura Server | |
mura: | |
build: | |
context: ./ | |
dockerfile: Dockerfile.mura | |
environment: | |
MURA_ENVIRONMENT: local | |
LUCEE_JAVA_OPTS: "-Xms512m -Xmx1536m" | |
MURA_DATASOURCE: ${dbname} | |
MURA_DATABASE: ${dbname} | |
MURA_DBTYPE: mysql | |
MURA_DBUSERNAME: ${dbusername} | |
MURA_DBPASSWORD: ${dbpassword} | |
MURA_DBCONNECTIONSTRING: "jdbc:mysql://${dbhost}:3306/${dbname}?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true" | |
MURA_DBCLASS: com.mysql.cj.jdbc.Driver | |
MURA_ASSETDIR: "/s3assets/${instance_bucket}" | |
MURA_ASSETPATH: "" | |
MURA_FILEDIR: "/s3assets/${instance_bucket}" | |
MURA_S3ASSETS: "s3://${aswAccessKey}:${aswSecretKey}@/${parent_bucket_of_instance_bucket}/" | |
MURA_FILESTOREENDPOINT: "http://${parent_bucket_of_instance_bucket}.s3.amazonaws.com" | |
MURA_PORT: 80 | |
MURA_TIMEZONE: "PST" | |
MURA_ENABLEDEVELOPMENTSETTINGS: "false" | |
MURA_ENABLELOCKDOWNBYPASS: "true" | |
MURA_CACHEIMAGEFILELOOKUPS: "true" | |
MURA_ADVANCEDCACHING: "true" | |
MURA_BROADCASTCACHEPURGES: "true" | |
MURA_FMSHOWAPPLICATIONROOT: "true" | |
MURA_FMSHOWSITEFILES: "true" | |
MURA_ALLOWAUTOUPDATES: "false" | |
MURA_MEMCACHEDSESSIONSERVER: memcached:11211 | |
MURA_ADMINSSL: "true" | |
#MURA_ADMINDOMAIN: domain.com | |
MURA_DEBUGGINGENABLED: "true" | |
MURA_SECURECOOKIES: "true" | |
#MURA_COOKIEDOMAIN: .domain.com | |
MURA_ADMINEMAIL: ${MURA_ADMINEMAIL:-info@example.com} | |
MURA_PORT: ${WEB_PORT:-80} | |
MURA_TIMEZONE: "PST" | |
MURA_ENABLEDEVELOPMENTSETTINGS: "true" | |
MURA_USEDEFAULTSMTPSERVER: "true" | |
volumes: | |
#- ./app/etc:/var/www/etc | |
#- ./app/modules:/var/www/modules | |
#- ./app/themes:/var/www/themes | |
ports: | |
- "${MURA_PORT:-8888}:8888" | |
healthcheck: | |
disable: true | |
#MySQL | |
mysql: | |
image: mysql:latest | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: muradb | |
volumes: | |
- mura_mysql_data:/var/lib/mysql | |
ports: | |
- "55555:3306" | |
#Nginx Server | |
web: | |
build: | |
context: ./ | |
dockerfile: Dockerfile.nginx | |
args: | |
- s3host=${parent_bucket_of_instance_bucket}.s3.amazonaws.com | |
- s3bucket=${instance_bucket} | |
- proxyhost=mura:8888 | |
ports: | |
#- "${WEB_PORT:-80}:80" | |
volumes: | |
#- ./app:/usr/share/nginx/html | |
healthcheck: | |
disable: true | |
mailcatcher: | |
image: schickling/mailcatcher | |
ports: | |
- "${MAILCATCHER_PORT:-1080}:1080" | |
- "${SMTP_PORT:-1025}:1025" | |
# elasticsearch: | |
# image: elasticsearch:7.0.1 | |
# ports: | |
# - "9200:9200" | |
# - "9300:9300" | |
# environment: | |
# discovery.type: single-node | |
# # discovery.seed_hosts: | |
# # discovery.seed_providers: | |
# # cluster.initial_master_nodes: | |
# volumes: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment