On Fri, 12.06.15 17:50, Peter Paule ([email protected]) wrote:

> Hi there,
> 
> is there a chance to pass (the given) environment variables down to
> `unicorn` and `delayed_job-worker`?
> 
>     systemd (host)
>       |
>        - docker-app.service
>          Environment="RAILS_ENV=production"
>          Environment="DATABASE_URL=postgresql://localhost/app_development"
>           |
>            - docker
>               |
>                - systemd (container)
>                   |
>                    - unicorn (ruby)
>                   |
>                    - delayed_job-worker (ruby)
> 
> Background:
> 
> I need to wrap a rails application within CentOS-image. To make the image
> re-usable I decided to use the DATABASE_URL-environment variable to configure
> the database. I also need to switch the RAILS_ENV.
> 
> I'm using this image here
> https://registry.hub.docker.com/u/feduxorg/centos/dockerfile/. It's based on
> the official docker image which uses the `systemd-container`-package from
> CentOS.

Nope, we deliberately clean up the env block we pass to services.

You can reimport the env vars though by reading them from
/proc/1/environ. Needs some manual hackery though... 

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to