Giter Site home page Giter Site logo

sparc-request-docker-talk's Introduction

Containerizing SPARCRequest

This repository showcases a method of building and running SPARCRequest as a container. It was presented on Sept. 30th, 2020 at the SPARC Open Source Technical Call. See the presentation document for the points covered.

Building the images

To build the images first build the Dockerfile-base.

docker build --file Dockerfile-base --tag my_sparc_request_base .

You can optionally specify a release GitHub tag.

docker build --file Dockerfile-base --tag my_sparc_request_base --build-arg SPARC_VERSION=x.x.x .

At this point you have a basic SPARCRequest Docker image without customization. The Dockerfile provides basic customization which replaces the default configuration files with ones that pull details from environment variables. To build this image run the command:

docker build --tag my_sparc_request --rm .

You now have a image that can be run to set up SPARCRequest. As there are a number of environment variables required to get SPARCRequest running it is easiest to copy the env.sample to .env and adjust the values to match your environment.

cp env.sample .env

SPARCRequest provides a number of rake tasks to setup the database which need to do be done before you can run the application. The easiest approach is to run the container from the command line and execute these tasks by hand

docker run -i -t --env-file=.env --rm my_sparc_request /bin/bash
bundle install && rake db:create && rake db:migrate

Finally, we can run the container now the database has been initialized

docker run -i -t --env-file=.env --rm my_sparc_request /bin/bash

Alternatively, you can use Docker Compose and the provided [docker-compose.yml] to bootstrap much of the environment.

Reproducing the slides

The slides were created with reveal-md. To view the presentation run

npm install -g reveal-md
reveal-md PRESENTATION.md

The background picture, Plasma, was created by doomlordvekk, and used under the Creative Commons license.

sparc-request-docker-talk's People

Contributors

kirenotneb avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

jrumbut

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.