Last active
August 29, 2015 14:19
-
-
Save stevepereira/1906d98f58f0ce7a0285 to your computer and use it in GitHub Desktop.
Datomic config
This file contains hidden or 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: datomic | |
# Short-Description: Start datomic transactor | |
### END INIT INFO | |
# | |
# Copyright (c) Vital Reactor LLC | |
# | |
# description: starts up datomic transactor in fixed location | |
env PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:$PATH | |
env HOME=/opt/xn_apps | |
env DAEMON=/opt/datomic/current/bin/transactor | |
# If you want custom Xmx or Xms values, set them before the property file like so: | |
#env DAEMON_OPTS='-Xmx4g /etc/datomic/transactor.properties' | |
env DAEMON_OPTS='/etc/datomic/transactor.properties' | |
env DESC=DatomicTransactor | |
env APPDIR=/opt/xn_apps | |
env enabled=1 | |
setuid root | |
setgid root | |
exec test -x $DAEMON || echo "$DESC Already running" && exit 1 | |
description "$DESC" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
pre-start script | |
if [ ! -d "$APPDIR" ]; then | |
mkdir -p $APPDIR | |
fi | |
end script | |
script | |
$DAEMON $DAEMON_OPTS >> /var/log/datomic.log 2>&1 | |
end script |
This file contains hidden or 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
########### free mode config ############### | |
protocol=free | |
host=localhost | |
#free mode will use 3 ports starting with this one: | |
port=4334 | |
## OPTIONAL #################################################### | |
# The dev: and free: protocols typically use three ports | |
# starting with the selected :port, but you can specify the | |
# other ports explicitly, e.g. for virtualization environs | |
# that do not issue contiguous ports. | |
# h2-port=4335 | |
# h2-web-port=4336 | |
################################################################ | |
# See http://docs.datomic.com/capacity.html | |
# Recommended settings for -Xmx4g production usage. | |
# memory-index-threshold=32m | |
# memory-index-max=512m | |
# object-cache-max=1g | |
# Recommended settings for -Xmx1g usage, e.g. dev laptops. | |
memory-index-threshold=32m | |
memory-index-max=256m | |
object-cache-max=128m | |
## OPTIONAL #################################################### | |
# Set to false to disable SSL between the peers and the transactor. | |
# Default: true | |
encrypt-channel=false | |
# Data directory is used for dev: and free: storage, and | |
# as a temporary directory for all storages. | |
data-dir=/opt/xn_apps/datomic.data | |
# Transactor will log here, see bin/logback.xml to configure logging. | |
log-dir=/opt/xn_apps/datomic.log | |
# Transactor will write process pid here on startup | |
pid-file=/opt/xn_apps/datomic.pid | |
## OPTIONAL #################################################### | |
# See http://docs.datomic.com/capacity.html | |
# Soft limit on the number of concurrent writes to storage. | |
# Default: 4, Miniumum: 2 | |
# write-concurrency=4 | |
# Soft limit on the number of concurrent reads to storage. | |
# Default: 2 times write-concurrency, Miniumum: 2 | |
# read-concurrency=8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment