Clean up dockerfile organization

[?]
Dec 12, 2017, 3:57 AM
QTHFTPDXPN4HVSFQBRUHDQXMXQ3S5KW3TSEYGM7IBYFZROJSFIIAC

Dependencies

  • [2] 3TAMXHCZ Add migrations to server startup.
  • [3] 4ZLEDBK7 Initial attempts at dockerizing, cabal isn't cooperating.
  • [4] JEOPOOPT Dockerfile now builds correctly.
  • [5] EW2XN7KU Update docker build, clean up migration for payments tables.
  • [6] 2LZYVHFS Upgrade to Stack-based build in Docker
  • [7] SOIAMXLW Build versioned docker images.
  • [8] T3X4DRLF Add dbmigrations to the docker build.
  • [9] 7VGYLTMU Clean up schema version handling.
  • [10] HO2PFRAB Client login now handles response correctly.
  • [11] DXIGERDT Change order of Docker build to avoid rebuilding the universe.
  • [12] M3KUPGZK Add invitation email template.

Change contents

  • replacement in Dockerfile at line 23
    [3.331][3.331:436](),[3.436][3.1:35]()
    RUN apt-get install -y --no-install-recommends nodejs
    RUN apt-get install -y --no-install-recommends npm
    RUN npm install -g npm bower pulp
    [3.331]
    [3.460]
    # RUN apt-get install -y --no-install-recommends nodejs
    # RUN apt-get install -y --no-install-recommends npm
    # RUN npm install -g npm bower pulp
  • replacement in Dockerfile at line 28
    [3.519][3.519:565]()
    RUN ln -s /usr/bin/nodejs /usr/local/bin/node
    [3.519]
    [3.1]
    # RUN ln -s /usr/bin/nodejs /usr/local/bin/node
    # Install ghc globally so that we don't have to reinstall it
    # whenever we change stack.yaml or aftok.cabal
    ADD ./docker/global-stack.yaml /root/.stack/global-project/stack.yaml
    RUN stack --resolver lts-7.16 setup
    # Globally install database migrations tool
    RUN stack install dbmigrations
  • edit in Dockerfile at line 43
    [3.885][3.188:331]()
    # This is the main shell script that starts the aftok server
    RUN mkdir /etc/service/aftok
    ADD ./docker/aftok-server.sh /etc/service/aftok/run
  • replacement in Dockerfile at line 44
    [3.47][3.1:29]()
    RUN mkdir -p /opt/aftok/bin
    [3.47]
    [3.48]
    RUN mkdir -p /opt/aftok
  • edit in Dockerfile at line 47
    [3.327][3.327:472]()
    # Install ghc globally so that we don't have to reinstall it
    # whenever we change stack.yaml or aftok.cabal
    RUN stack --resolver lts-7.16 setup
  • edit in Dockerfile at line 59
    [3.222]
    [3.222]
    ADD ./migrations /opt/aftok/migrations
  • edit in Dockerfile at line 62
    [3.268]
    [3.268]
    RUN mkdir /opt/aftok/bin
  • replacement in Dockerfile at line 76
    [3.43][2.24:53](),[2.53][3.43:56](),[3.43][3.43:56](),[3.56][2.54:124](),[2.124][3.56:87](),[3.56][3.56:87](),[3.87][2.125:164]()
    # Set up database migrations
    WORKDIR /opt
    ADD ./docker/global-stack.yaml /root/.stack/global-project/stack.yaml
    RUN stack install dbmigrations
    ADD ./migrations /opt/aftok/migrations
    [3.43]
    [3.828]
    # Add the main shell script that starts the aftok server
    RUN mkdir /etc/service/aftok
    ADD ./docker/aftok-server.sh /etc/service/aftok/run