-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from Expensify/sam_xenial_build_config
Update bedrock config files for Ubuntu 14.04 and 16.04 - reviewed, merging
- Loading branch information
Showing
6 changed files
with
74 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Bedrock default config file. | ||
# Run `bedrock -?` for help with command line arguments | ||
|
||
# Path of db file; will be created if absent | ||
BEDROCK_DB_PATH="/var/lib/bedrock/bedrock.db" | ||
|
||
# If running a cluster, these values need to be different for each node. | ||
THISNODE="bedrock" | ||
PRIORITY=200 | ||
|
||
# Cache size in kilobytes. Default: 1GB | ||
CACHE_SIZE="-cacheSize 10000" | ||
|
||
# Bind to network address | ||
SERVER_HOST="0.0.0.0:8888" | ||
NODE_HOST="0.0.0.0:8889" | ||
|
||
# Number of worker threads. Default: # of CPUs on the system. | ||
# WORKER_THREADS="-workerThreads 1" | ||
|
||
# Select which plugins to run. Default: db,jobs,cache | ||
# PLUGINS="-plugins db,jobs,cache" | ||
|
||
# If running a cluster, uncomment to enable. | ||
# PEER_LIST="-peerList node1,node2" | ||
|
||
# Use '-v' for verbose or '-q' for quiet. Omit this option for standard log level. | ||
# LOG_LEVEL="-v" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[Unit] | ||
Description=Expensify Bedrock Server | ||
Documentation=http://bedrockdb.com/ | ||
After=network.target | ||
|
||
# The following creates the database file if absent | ||
After=bedrock_prerequisites.service | ||
Requires=bedrock_prerequisites.service | ||
|
||
[Service] | ||
EnvironmentFile=/etc/bedrock/bedrock.conf | ||
PIDFile=/var/run/bedrock.pid | ||
|
||
Type=forking | ||
|
||
ExecStart=/usr/sbin/bedrock \ | ||
-fork \ | ||
-pidFile /var/run/bedrock.pid \ | ||
-nodeName ${THISNODE} \ | ||
-db ${BEDROCK_DB_PATH} \ | ||
-serverHost ${SERVER_HOST} \ | ||
-nodeHost ${NODE_HOST} \ | ||
-priority ${PRIORITY} \ | ||
${PLUGINS} \ | ||
${WORKER_THREADS} \ | ||
${CACHE_SIZE} \ | ||
${PEER_LIST} \ | ||
${LOG_LEVEL} | ||
|
||
ExecStop=/bin/kill -TERM $MAINPID | ||
KillMode=process |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Generates prerequisite files for bedrock.service, if absent | ||
Documentation=http://bedrockdb.com/ | ||
|
||
[Service] | ||
Type=oneshot | ||
EnvironmentFile=/etc/bedrock/bedrock.conf | ||
|
||
# The following creates database dir and database file | ||
ExecStart=/bin/sh -c 'mkdir -p "$(dirname "${BEDROCK_DB_PATH}")"' | ||
ExecStart=/bin/sh -c 'test -f "${BEDROCK_DB_PATH}" || touch "${BEDROCK_DB_PATH}"' |
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
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