Skip to content

Latest commit

 

History

History
90 lines (55 loc) · 2.29 KB

QUICKSTART.md

File metadata and controls

90 lines (55 loc) · 2.29 KB

StoryMap development quickstart

Questions not yet completely addressed:

  • Built static is served directly from the compiled directory. What is the process in development for building/reloading this?
  • Related: our overall build management depends on Fabric and fablib. What is the best way to get this working in this context?
  • Which parts of the SSL process below are actually needed? Flask is now using adhoc ssl context. Not sure what localstack actually needs here, but share links can be directly accessed via http. The current process requires accepting the self-signed cert every time the stack is restarted, so maybe we will want to revert to a process that actually uses certs with Flask?

Getting started developing StoryMap with docker-compose

Install docker-compose

Be sure to have Docker and (docker-compose)[https://docs.docker.com/compose/] installed.

Build ssl certs for localstack

These certs are required in order for localstack to serve s3 content.

 $ ./makecerts.sh

Import the new cert:

  • Trust cert. E.g.: Apple Keychain > System. File > Import items: .localstack/server.test.pem (Set to trust SSL)

Note: It is not clear if this Firefox import works correctly. If you want to view a share link, ie. a StoryMap directly from the localstack hosted s3, you can do it via http rather than https. The backend calls to localstack should still work without this import.

Note: on Mac, hit CMD+SHIFT+. to see dotted files in the finder.

  • For Firefox:
    • Preferences >
    • Certificates >
    • View Certificates >
    • Your Certificates >
    • Import .localstack/KnightLabRootCA.pem

Create a .env file

 $ cp dotenv.example .env

Fill in the missing keys and other secret info.

Run the development docker-compose stack

 $ docker-compose build
 $ docker-compose up

Create the s3 buckets

After the services come up, create the required buckets:

 $ ./makebuckets.sh

Create the users table

 $ ./create-tables.sh

Open application

Navigate to https://localhost and accept the self-signed certificate.

Docker troubleshooting

Some commands to know:

 $ docker-compose images
 $ docker-compose up --remove-orphans
 $ docker ps
 $ docker stop
 $ docker system prune
 $ docker volume ls
 $ docker volume rm