Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Development
  1. OpenProject
  2. Forums
  3. Development
  4. Development Environment with Docker

Development Environment with Docker

Added by sanji bukai almost 7 years ago

Hi everyone,

I saw this tutorial https://www.openproject.org/development/setting-up-development-environment/ but I wanted to be able to run OpenProject within docker..

In fact I’m able to run a fresh OpenProject Docker container using the “official” container with docker pull openproject/community..

However, I wanted to be able to run container when having the ability to access (and modify) the code..

I thought that simply by cloning the github repository and since it has some Dockerfile and even docker-compose file, it would be easy, but I cannot be able to lauch a working container..

Is it possible to get a guide on how to launch a development container?

Or if it is easier, how can I build a Docker container (like the one available in the docker hub), from the cloned repo (and where I made some modifications)?
A simple docker build is it enough?


Replies (2)

RE: Development Environment with Docker - Added by Muhammad Rahman over 6 years ago

I have tried to follow the same path, but failed to make it work.

Then tried to follow a different approach. 

initially started with :

sudo mkdir -p /Users/adnan/rubydev/openproject/{pgdata,logs,static}

docker run -d -p 8090:80 --name openproject -e SECRET_KEY_BASE=secret \
  -v /Users/adnan/rubydev/openproject/pgdata:/var/lib/postgresql/9.6/main \
  -v /Users/adnan/rubydev/openproject/logs:/var/log/supervisor \
  -v /Users/adnan/rubydev/openproject/static:/var/db/openproject \
  openproject/community:8

Then copy the APP_PATH content to local folder: 

sudo mkdir -p /Users/adnan/rubydev/openproject/app
docker cp -a -L openproject:/usr/src/app/. /Users/adnan/rubydev/openproject/app/

#Remove the current container
docker stop openproject && docker rm openproject

#Re-create the container but now with volume linked between APP_PATH and copied local folder.
docker run -d -p 8090:80 --name openproject -e SECRET_KEY_BASE=secret \
  -v /Users/adnan/rubydev/openproject/pgdata:/var/lib/postgresql/9.6/main \
  -v /Users/adnan/rubydev/openproject/logs:/var/log/supervisor \
  -v /Users/adnan/rubydev/openproject/static:/var/db/openproject \
  -v /Users/adnan/rubydev/openproject/app:/usr/src/app \
  openproject/community:8

Starting container now taking longer time and it is failing to app loader timeout from Apache --> Passenger --> App start (Load Application). 

It suggests: "increase the spawn timeout (currently configured at 90 sec), or find a way to lower the server's resource utilization."

But failed to find how to increase it to meet the need. 

Any suggestions or success in making other way work?

RE: Development Environment with Docker - Added by Markus Kahl over 4 years ago

For future users who may stumble upon this through google: There now is a way to develop OpenProject using docker.
It's simply a matter of bin/compose up now and you're done. Code can be modified locally and will be reloaded automatically.

See: https://docs.openproject.org/development/development-environment-docker/

  • (1 - 2/2)
Loading...