Name: facebook-groups-messenger-bot
Owner: ABC News
Description: null
Created: 2017-03-22 03:05:03.0
Updated: 2017-11-15 05:04:52.0
Pushed: 2017-07-11 04:32:33.0
Homepage: null
Size: 327
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This repository contains code which runs the ABC News Facebook Messenger extension.
The main component is an Express app which (at this point) serves the page which loads in messenger when the ABC News icon is selected from the 'draw' in Messenger.
There are, however, a number of other components which make up the system.
The Docker host which runs this service is configured with an nginx proxy which takes all requests on ports 80 and 443 and routes them to the correct docker container depending on the domain name being requested.
The lets-encrypt companion takes care of issuing and installing valid security certificates.
See more information about the setup in docker-compose.yml
.
While these containers are currently specified as part of the docker-compose config, they may be moved out at some point as they are independent and don't depend on anything in this repo (but this project does depend on them, which is why they're currently defined in the compose file).
Because ABC News image assets are not yet served over an HTTPS connection, it was necessary to proxy all images. This is done with a separate docker container running camo.
Local development of the Express app is possible by cloning this repo and:
m i -g gulp
m i
lp
You should find the output at http://localhost:3000/groupshare
To get the images loading you will need to set the CAMO_KEY
environment variable. See the cridentials.blank.env
file for all other env vars of relevance. This is where all the secrets are kept, so talk to someone relevant if you need the actual secrets.
To deploy the app you'll need all the relevant keys to access the docker host. You can use machine-share to import the keys (talk to someone who has them if you need them).
After you've imported the machine, you should use docker-machine
and docker-compose
for deployments.
al $(docker-machine env facebook-groups-messenger-bot)
er-compose up -d
This should build the relevant images defined in docker-compose.yml
(if necessary) and boot them.
You may want to do these things separately via docker-compose build <image-name>
and docker-compose up -d <image-name>
.
See the docker-compose documentation for more details.