Giter Club home page Giter Club logo

docker's Introduction

Docker images for Decidim

Images are mirrored on Docker Hub and Github Container Registry.

Image naming has changed recently.

We now use different names for images with different purposes, while previously we were using tagging to distinguish between them. CIs and scripts will need to be updated accordingly on updates after v0.23.1.

Biggest naming change:

The app generator gem used to be called decidim and is now called decidim-generator. There's now a new decidim image for a fully functioning generated Decidim app.

Here's the complete list of images and their purposes:

Images available

decidim

Decidim app pre-generated with core modules.

Tagged as decidim:latest or decidim:<version> (eg: decidim:0.23.1).

decidim-generator

The decidim gem with all necessary environment for running it.

Tagged as decidim-generator:latest or decidim-generator:<version> (eg: decidim-generator:0.23.1).

decidim-test

The above gem environment plus tooling for testing.

Tagged decidim-test:latest or decidim-test:<version> (eg: decidim-test:0.23.1).

decidim-dev

The above plus more configuration for running local dev environment.

Tagged decidim-dev:latest or decidim-dev:<version> (eg: decidim-dev:0.23.1).

Hello World with docker-compose

This repo includes a docker-compose.yml file with:

  • a Decidim service (using the decidim:latest image)
  • a Postgres service
  • a Redis service

By cloning the repo and then running docker-compose up, you'll get a fully functional Decidim app complete with seed data, accessible at http://localhost:3000.

git clone [email protected]:decidim/docker.git decidim-docker
cd decidim-docker
docker-compose up

It'll take a couple of minutes to run through all migrations and seeds. At the end you should see:

(...lots of migrating and seeding...)
decidim_1  | Puma starting in single mode...
decidim_1  | * Version 4.3.5 (ruby 2.6.6-p146), codename: Mysterious Traveller
decidim_1  | * Min threads: 5, max threads: 5
decidim_1  | * Environment: development
decidim_1  | * Listening on tcp://0.0.0.0:3000
decidim_1  | Use Ctrl-C to stop

Note: in case you run into SSL redirection errors, opening it on an incognito window usually solves the problem.

Using the decidim app image individually

Locally, with running local database

docker run -it --rm \
  -e DATABASE_USERNAME=postgres \
  -e DATABASE_PASSWORD=postgres \
  -e RAILS_ENV=development \
  -p 3000:3000 \
  ghcr.io/decidim/decidim:latest

In production

docker run -it --rm \
  -e DATABASE_URL="postgres://user:pass@postgres-host/decidim-production-db" \
  -p 3000:3000 \
  ghcr.io/decidim/decidim:latest

Using the decidim-generator image

With this image you can generate a new Decidim application:

APP_NAME=HelloWorld
IMAGE=ghcr.io/decidim/decidim-generator:latest
docker run -it -v "$(pwd):/code" ${IMAGE} decidim ${APP_NAME}
sudo chown -R $(whoami): ${APP_NAME}

From here on you can follow the steps on the Getting Started guide.

docker's People

Contributors

josepjaume avatar deivid-rodriguez avatar tramuntanal avatar oriolgual avatar mrcasals avatar oliverbarnes avatar andreslucena avatar ahukkanen avatar jsperezg avatar loleg avatar

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.