NoOPeEKS / decidim-deployment-guide

A free and open-source full guide on how to setup a fully working production dockerized Decidim instance for your organization. From creating an EC2 AWS instance to its full deployment with just executing some scripts!
3 stars 0 forks source link

Could not locate Gemfile #8

Open psharma04 opened 1 month ago

psharma04 commented 1 month ago

When bringing up the swarm, the command sudo docker stack deploy -c docker-compose.yml decidim-tutorial fails. The decidim container has the error Could not locate Gemfile.

NoOPeEKS commented 1 month ago

Hi @psharma04, this error is weird and most probably related to Decidim's image. But could you please provide the error log to see what may be causing it? Also some steps to reproduce your exact environment could be really useful! Which version of the decidim image are you using?

psharma04 commented 1 month ago

Zen Browser 2024-10-08 23 15 34 This is with the stock docker-compose file (0.28.1 decidim).

version: "3"
services:
  decidim:
    image: ghcr.io/decidim/decidim:0.28.1
    container_name: container_decidim
    entrypoint: ["/code/vendor/hello-world.sh"]
    command: ["bundle", "exec", "rails", "s", "-b", "0.0.0.0"]
    ports:
      - 3000:3000
    volumes:
      - /tmp/rails_storage:/code:storage
      - ./scripts:/code/vendor
    environment:
      - TZ=Australia/Sydney
      - DISABLE_DATABASE_ENVIRONMENT_CHECK=1
      - SECRET_KEY_BASE=(openssl generated string)
      - RAILS_ENV=production
      - DATABASE_HOST=pg
      - DATABASE_USERNAME=postgres
      - SMTP_USERNAME=(mailgun smtp email)
      - SMTP_PASSWORD=(mailgun smtp password)
      - SMTP_ADDRESS=(mailgun smtp email)
      - SMTP_DOMAIN=(mailgun smtp server)
    links:
      - pg
      - redis
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
  pg:
    image: postgres
    volumes:
      - pg-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
  redis:
    image: redis
    volumes:
      - redis-data:/data
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
  nginx:
    image: nginx_custom
    build:
      context: .
      dockerfile: nginx.Dockerfile
    depends_on:
      - decidim
      - pg
      - redis
    ports:
      - 443:443
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
volumes:
  pg-data: {}
  redis-data: {}