Add migrations to server startup.

[?]
Dec 12, 2017, 3:50 AM
3TAMXHCZCOX6G3PNSWI74WJSR3J7FPGYBL67Y3TIJXW5HC5ZFRBQC

Dependencies

  • [2] T3X4DRLF Add dbmigrations to the docker build.
  • [3] 4ZLEDBK7 Initial attempts at dockerizing, cabal isn't cooperating.
  • [4] LEINLS3X Update deployment documentation.
  • [5] EW2XN7KU Update docker build, clean up migration for payments tables.
  • [6] IPG33FAW Add billing daemon
  • [7] 7VGYLTMU Clean up schema version handling.
  • [8] 2LZYVHFS Upgrade to Stack-based build in Docker
  • [*] HO2PFRAB Client login now handles response correctly.
  • [*] EPOYLP7O A little .gitignore cleanup.

Change contents

  • edit in .dockerignore at line 6
    [3.36][3.36:47]()
    migrations
  • edit in Dockerfile at line 48
    [3.513][3.513:514]()
  • edit in Dockerfile at line 49
    [3.441]
    [3.441]
    # Build dependencies
  • edit in Dockerfile at line 58
    [3.222][2.1:41]()
    ADD ./migrations /opt/aftok/migrations
  • edit in Dockerfile at line 73
    [2.43]
    [2.43]
    # Set up database migrations
  • edit in Dockerfile at line 75
    [2.56]
    [2.56]
    ADD ./docker/global-stack.yaml /root/.stack/global-project/stack.yaml
  • edit in Dockerfile at line 77
    [2.87]
    [10.828]
    ADD ./migrations /opt/aftok/migrations
  • file addition: aftok-migrations.cfg.example (----------)
    [11.54]
    DBM_DATABASE_TYPE="postgresql"
    DBM_DATABASE="host=127.0.0.1 user=aftok password=empty dbname=aftok"
    DBM_MIGRATION_STORE="/opt/aftok/migrations"
    DBM_TIMESTAMP_FILENAMES=on
  • edit in docker/aftok-server.sh at line 3
    [3.1544]
    [3.289]
    /root/.local/bin/moo upgrade -c /etc/aftok/aftok-migrations.cfg
  • file addition: global-stack.yaml (----------)
    [3.1510]
    # This is the implicit global project's config file, which is only used when
    # 'stack' is run outside of a real project. Settings here do _not_ act as
    # defaults for all projects. To change stack's default settings, edit
    # '/root/.stack/config.yaml' instead.
    #
    # For more information about stack's configuration, see
    # http://docs.haskellstack.org/en/stable/yaml_configuration/
    #
    flags: {}
    extra-package-dbs: []
    packages: []
    resolver: lts-7.16
    extra-deps:
    - yaml-light-0.1.4
    - HsSyck-0.53