Remove outdated installation docs.
[?]
Jan 31, 2021, 7:18 PM
JJQTDJZT32I4R2X4PL3I7GY4CNYFFD5WNGRAUIC7P6AQUWP74HAACDependencies
- [2]
NZGH6W6Vadd cabal install cpphs step to docs to avoid thyme install failure - [3]
XZLSHL4DThe server is now (tenuously) running, and serving pages via SSL! - [4]
QO4NFWIYAdded sample config file. - [5]
IRG4KNAETrivial deletion. - [6]
M4KM76DGMerge branch 'stackify' - [7]
EQXRXRZDChanged to use tasty instead of test-framework - [8]
RSEB2NFGReplacing Snap with Scotty. - [9]
PBD7LZYQPostgres & auth are beginning to function. - [10]
45QJYWN3Fixing up the README. Still struggling with the ending. - [11]
E2KOBKIJAdd setup script detailing the setup of the docker host. - [12]
2Y2QZFVFSwitch to more modern cabal2nix-based workflow. - [13]
LEINLS3XUpdate deployment documentation. - [14]
NTPC7KJETrivial changes, feature scratchpad. - [15]
GMYPBCWEMake docker-compose work. - [16]
EW2XN7KUUpdate docker build, clean up migration for payments tables. - [17]
LAROLAYUWIP - [18]
ADMKQQGCInitial empty Snap project. - [19]
EZQG2APBUpdate task list. - [20]
OBFPJS2GProject successfully builds and tests under nix. - [21]
PGZJ736CUpdate aftok.cfg.example and revise INSTALL instructions - [22]
KEP5WUFJConvert project to stack-based build. - [23]
HMDM3B55Implement core of payments/billing infrastructure. - [24]
HN754HM5Add README. - [25]
RFYEVKZQAdd nix-shell based build environment. - [26]
IPG33FAWAdd billing daemon - [27]
46OSK255Add reactclient submodule. - [28]
RJ2RF7DGLicense under the AGPL - [29]
4ZLEDBK7Initial attempts at dockerizing, cabal isn't cooperating. - [30]
4U7F3CPITHE GREAT RENAMING OF THINGS! - [31]
373LXH2XAdd MAYBE.md, update task list. - [32]
2WOOGXDHUse dbmigrations to manage database state. - [33]
X3ES7NUAFine. I'll use ormolu. At least it doesn't break the code. - [34]
RB2ETNIFAdd skeletal PureScript client project. - [35]
NVOCQVASInitial failing tests. - [36]
DLZRD7VBAdd a preliminary, probably somewhat broken set of setup instructions. - [37]
AXKKXBWNInitial attempt at writing down my ideas for a company based on trust. - [38]
ZKJJVD2HFix aftok-server runit script permissions. - [39]
JEOPOOPTDockerfile now builds correctly. - [40]
5W5M56VJMove library code to 'lib' - [41]
T44T2PDLRename trust.txt to README.md - [42]
64C6AWH6Rename Ananke -> Quixotic, project reboot. - [43]
45AI46JNMove readme to inception.md - [44]
EPOYLP7OA little .gitignore cleanup. - [45]
ZP62WC47Begin conversion to build with stack. - [46]
DFOBMSAOInitial work on payments API - [47]
B6HWAPDPModularize & update to recent haskoin. - [48]
NJNMO72SAdd zcash.com submodule and update client to modern halogen.
Change contents
- file deletion: INSTALL.md
Development Installation========================First, you'll need a local install of postgres. This is because thepostgresql-simple package requires some of the postgres command-line toolsand/or libraries in order to build.You'll want to create a new postgres database for the aftok project, and auser with superuser permissions on that database. Then, you can use thescript sql/aftok-pg.sql to create the initial state of your database.psql -h localhost -f sql/aftok-pg.sql aftok aftokThen, the usual setup steps apply:cabal sandbox initcabal configurecabal install --only-dependencies --enable-testscabal buildcabal testIf using nix, instead you can do the following:cd <project_root>cabal2nix --shell . > shell.nixnix-shell -I ~ --command 'cabal configure --enable-tests'Next, copy the example config file into place and edit it to provide the port you wantthe service to run on, and your postgres database connection information.cp conf/aftok.cfg.example conf/aftok.cfgvi conf/aftok.cfgNow, when you do 'cabal run aftok-server' it should actually start up and run.There are a few shell scripts in <project_root>/scripts that provide basicfunctionality for creating a project, creating a user, and starting andstopping your clock. Right now these are hardcoded with project identifiers anda bitcoin address that are local to a test blockchain on my system. Speaking ofwhich, you'll also eventually want to install bitcoind, although at the momentbasically nothing related to the bitcoin infrastructure is working anyway soit's not immediately necessary.Docker Installation===================The Aftok server application is now deployable under Docker. Here's how you cango about running the server in a local docker container:docker build -t <yourid>/aftok:<version> .for example,docker build -t nuttycom/aftok:0.1 .To run the container in "development" mode, it's useful to leave open a TTY, so that youcan see output from stdout:docker run -i -t --net="host" -v /home/nuttycom/projects/aftok/docker-conf:/etc/aftok <image_id>Or, you can daemonize the container, as we will do in production:docker run -d --net="host" -v /home/nuttycom/projects/aftok/docker-conf:/etc/aftok <image_id>In both of these cases, I'm simply using the --net="host" switch to allow the containeraccess to 'localhost' on the host machine, so that I don't have to explicitlyconfigure where postgres is running.This will give you an image ID that you can then run. The container is set upto provide a mountable filesystem volume at /etc/aftok where you can put yourconfiguration files. You will need to copy your aftok.cfg file and your two.pem files to somewhere local (say, a docker-conf directory) and then edit theaftok.cfg file make sense in the context of the container. For example, here'san aftok.cfg set up for docker use:~~~port = 8000siteKey = "/etc/aftok/snap-site-key"db {host = "localhost"port = 5432user = "aftok"pass = ""db = "aftok"# Nmuber of distinct connection pools to maintain. The smallest acceptable# value is 1.numStripes = 1# Number of seconds an unused resource is kept open. The smallest acceptable# value is 0.5 seconds.idleTime = 5# Maximum number of resources to keep open per stripe. The smallest# acceptable value is 1.maxResourcesPerStripe = 20}~~~cabal install cpphs //for some reason the thyme library won't find this dependency on its own