Public | Automated Build

Last pushed: 7 months ago
Short Description
Flask site build
Full Description

Groove.io site

This is the repo that controls the viewing of the groove.io live music site. It's currently using Flask and communicates with a mongo database.

Usage

First, install docker toolkit. Use your mad google skillz to figure that out

To run the project, execute the following command in this directory: docker-compose up

The current docker-compose file adds the current directory as a volume so any edits you do locally will be instantly reflected in the container. Python source edits should restart the server. If its not picking up the change just restart the container.

As of this writing, when the compose stack comes up, the scraper will immediately go to the current day's gigs and populate the DB. Soon, all builds will be triggered via scrapyd's JSON API.

Organization

app/static - CSS, images
app/templates - HTML templates in jinja2
app/views.py - Router for all the endpoints. This does most of the db querying and builds the objects which are passed to the templates.

Testing

To hit the site, hit the docker endpoint:

http://192.168.99.100/gigs/2016-07-16

This repo will use automated testing eventually...

CI/CD

Committing to master on this repo will trigger a build on docker hub. Once finished, a trigger is sent to docker cloud where the container is pulled down and deployed to the environment. As the project grows, production deployments will need to be manually approved and automated deployments will go to a dev environment.

Troubleshooting

  • Check that the IP of the docker machine is right with docker-machine ip default
  • Ensure you're running the latest version of docker
  • If the entry point of the container is failing, you can edit the CMD so it just runs a simple bash script that runs a sleepy while loop. From there, you should be able to debug the container.
  • To shell into the container:
    docker ps - get container process ID
    docker exec -it <containerID> bash
Docker Pull Command
Owner
wandergeek
Source Repository

Comments (0)