Giter Club home page Giter Club logo

docker-udata's Introduction

uData all-in-one Docker image

Quick start

cd docker-udata
docker-compose up

Check that localhost:7000 is available in a browser.

Details

This Docker image provide uData as well as all known plugins and themes.

It is packaged to run within uwsgi with gevent support.

By default, it exposes the frontend on the port 7000 and expect the following services:

  • MongoDB on mongodb:27017
  • Elasticsearch on elasticsearch:9200
  • Redis on redis:6379

and use the following paths:

  • /udata/udata.cfg for udata configuration
  • /udata/fs for storage root (as a volume by default)
  • /udata/public for public assets root
  • /udata/uwsgi/*.ini for uwsgi configuration files
  • /src/*/setup.py for extra development packages to install

You can customize configuration by providing a custom udata.cfg or custom uwsgi ini file.

A sample docker-compose.yml file is also available in the repository.

Running docker image service

Fetch the latest Docker image version

docker pull udata/udata

Then you can run the container with different configurations:

  • a custom udata configuration mounted (here a local udata.cfg):

    docker run -v /absolute/path/to/udata.cfg:/udata/udata.cfg udata/udata
  • with custom uwsgi configurations (here contained in the uwsgi directory):

    docker run -v `$PWD`/uwsgi:/udata/uwsgi udata/udata
  • with file storage as local volume binding:

    docker run -v /path/to/storage:/udata/fs udata/udata

Running standalone instance

You can run standalone (front/worker/beat) instance with the front, worker and beat commands:

docker run udata/udata front
docker run udata/udata worker
docker run udata/udata beat

Running udata commands

You can also execute udata commands with:

docker run [DOCKER OPTIONS] udata/udata [UDATA COMMAND]

By example, to initialise the database with fixtures and initialize the search index:

docker run -it --rm udata/udata init

List all commands with:

docker run -it --rm udata/udata --help

Note: Some commands requires either MongoDB, Redis or Elasticsearch to be up and ready.

Running celery commands

You are also able to run celery commands with:

docker run -it --rm udata/udata celery status

Running bash

For debugging purpose you can acces a bash prompt with:

docker run [DOCKER OPTIONS] udata/udata bash

Installing extra sources

You can install extra sources by mounting directories as subdirectories of /src/.

Given you have a udata theme awesome-theme in my-theme directory and you want to use docker to hack on it with live reload, you need to have the following line in your udata.cfg:

THEME = 'awesome-theme'

Then you can run the udata Development server with:

docker run -it -v `$PWD`/my-theme:/src/my-theme -v `$PWD`/udata.cfg:/udata/udata.cfg --rm udata/udata serve

Your theme will be installed and activated.

See the sample/theme directory to see a full theme development using docker-compose.

Examples

You can see some docker-compose configuration examples in the sample directory of this repository.

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.