Update deployment documentation.
[?]
Nov 2, 2016, 3:10 AM
LEINLS3X55PB6TSCNC5RVMDMV56XHTV4MNDUC42H7DDFMPDYUNTACDependencies
- [2]
WVVD2KC4ignore moo.cfg file - [3]
7VGYLTMUClean up schema version handling. - [4]
DXIGERDTChange order of Docker build to avoid rebuilding the universe. - [*]
ADMKQQGCInitial empty Snap project. - [*]
AXKKXBWNInitial attempt at writing down my ideas for a company based on trust. - [*]
4ZLEDBK7Initial attempts at dockerizing, cabal isn't cooperating. - [*]
E2KOBKIJAdd setup script detailing the setup of the docker host. - [*]
XZLSHL4DThe server is now (tenuously) running, and serving pages via SSL! - [*]
2WOOGXDHUse dbmigrations to manage database state.
Change contents
- edit in .gitignore at line 23[2.9]
site_key.txt - file addition: DEPLOY.md[7.2]
Deployment==========At present, the aftok software is deployed on a DigitalOcean virtual machine.The deployment architecture is relatively unsophisticated; both thedocker engine and a postgres server are running directly on the host VM,and all other services are provided by containers.Configuration files for container-based services are stored on thehost vm under `/opt/containers/<container-name>` and are mountedinto the appropriate containers as part of the `docker run` invocationsthat are used to run the containers. A high-priority objective is tosimplify this setup by using `docker compose` to orchestrate thecontainers, and to containerize the postgres server and data.Docker Hub----------Configuration-free images containing the aftok server application is hosted ondockerhub at nuttycom/aftok. To push a new version:~~~{bash}docker build -t nuttycom/aftok:$(git describe)~~~Manual Setup------------See `deploy/setup.sh` for a complete list of the operations that wereperformed manually on the vm to get the aftok.com server up and running. - edit in Dockerfile at line 35
RUN apt-get install -y libsqlite3-devRUN stack install dbmigrations - edit in Dockerfile at line 42
ADD ./migrations /opt/aftok/migrations - file addition: Makefile[7.2]
build-container:docker build -t aftok/aftok:latest .run-local-docker:docker run --net=host -it -v /home/nuttycom/projects/aftok/docker-conf/:/etc/aftok aftok/aftok:latest - edit in deploy/setup.sh at line 24
# get the aftok image from dockerhubdocker logindocker pull nuttycom/aftok:0.1 - file addition: 2016-10-29_20-54-44_auction-timestamps.txt[11.1]
Description: (Describe migration here.)Created: 2016-10-29 20:54:59.060159 UTCDepends: 2016-10-13_05-36-55_user-event-logApply: |ALTER TABLE auctions ADD COLUMN created_at timestamp with time zone not null;ALTER TABLE auctions ADD COLUMN start_time timestamp with time zone not null;Revert: |ALTER TABLE auctions DROP COLUMN start_time;ALTER TABLE auctions DROP COLUMN created_at;