Open link in a new tab

Content

Expand project menu

Issue with OP One Container Per Process Docker

Hi,

When i tried to install the OpenProject using Docker One Container per Process method, i am getting the SSL protocol error. Where to update the environment variables to disable the HTTPS and HSTS.

Message actions

There has been no reply on this, I cannot use the docker image since the upgrade to v12.2.1 is getting redirected to HTTPS even after setting the environment variable as below. I have tried setting up the .env file, but still no luck. Can someone please let me know the exact process to disable the HTTPS?

I am using the one container per process docker method

Message actions

Hi Vipin,

please read here for the solution, you just have to execute the command inside the web container

https://community.openproject.org/projects/openproject/work_packages/43714/activity#activity-5

Kind regards Adam

Message actions

The link that you have provided is for setting the Openproject via Package installation, but i am setting up Openproject as Docker. Which command i have to execute in the web container and how to do it as i am new to docker.

Message actions

Thank you for your reply

I am aware of that and I thought you know that you are able to enter a container and execute a command, that is why i wrote INSIDE of the web container

please see here how to execute a command in the docker container

https://www.tutorialspoint.com/how-to-run-a-command-inside-docker-container

good luck

Message actions

When i try to run the command within the web container i get the below error

─ docker exec -it compose_web_1 /bin/bash (THE COMMAND THAT I EXECUTED TO GET IN THE CONTAINER)
root@57b70c8f5c35:/app# openproject config:set SERVER_PROTOCOL_FORCE_HTTPS="true"
bash: openproject: command not found

Message actions

Hi Vipin,

the command you're using is for the packaged installation only, which has a command line wrapper openproject allowing you to set configuration etc.)

For docker, you need to set it using ENV variables either in an env file or other means. See https://www.openproject.org/docs/installation-and-operations/installation/docker/#initial-configuration for more information, but please note this guide applies to the all-in-one container and docker-compose alike.

Best

Oliver

Message actions

I have tried with setting the ENV variables via the env file, but still the HTTPS is not getting disabled. Please help with exact steps.

Message actions

Hi,

I think you have to add it to the x-op-app part like below with false and not true

could you try this please?

x-op-app: &app
  <<: [*image, *restart_policy]
  environment:
    RAILS_CACHE_STORE: "memcache"
    OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
    OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
    DATABASE_URL: "${DATABASE_URL:-postgres://postgres:PASSWORD@db/openproject?pool=20&encoding=unicode&reconnect=true}"
    RAILS_MIN_THREADS: 4
    RAILS_MAX_THREADS: 16
    OPENPROJECT_HTTPS: "false"
    # set to true to enable the email receiving feature. See ./docker/cron for more options
    IMAP_ENABLED: "${IMAP_ENABLED:-false}"
  volumes:
    - "${OPDATA:-opdata}:/var/openproject/assets"
Message actions

It didnt work as it expects a string

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.cron.environment.OPENPROJECT_HTTPS contains false, which is an invalid type, it should be a string, number, or a null
services.seeder.environment.OPENPROJECT_HTTPS contains false, which is an invalid type, it should be a string, number, or a null
services.web.environment.OPENPROJECT_HTTPS contains false, which is an invalid type, it should be a string, number, or a null
services.worker.environment.OPENPROJECT_HTTPS contains false, which is an invalid type, it should be a string, number, or a null

Message actions

Hi Vipin

i changed the code snippet above to show "false" as string

Please be sure to only add the OPENPROJECT_HTTPS at:

x-op-app:

environment:

Message actions

Thanks it works now