# Do service level variables work only for non image services

**URL:** <https://community.convox.com/t/do-service-level-variables-work-only-for-non-image-services/790>\
**Category:** Configuration\
**Created:** [November 5, 2020, 9:45pm UTC](https://community.convox.com/t/do-service-level-variables-work-only-for-non-image-services/790 "2020-11-05T21:45:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgokhale](https://avatars.discourse-cdn.com/v4/letter/r/c2a13f/32.png) [@rgokhale](https://community.convox.com/u/rgokhale)\
**Post date:** [November 5, 2020, 9:45pm UTC](https://community.convox.com/t/do-service-level-variables-work-only-for-non-image-services/790/1 "2020-11-05T21:45:50Z")

</div>

If I have a service that is using a image and also has service level variables defined, I cant seem to access the service level variables in the service, they just don’t show up. Am I missing something here?

For example, doing the below doesn’t set the env variables

```auto
environment:
  - GLOBALFOO=foobar
services:
  web:
    image: nginx
    port: 80
    enviroment:
      - ENV1=env1
      - ENV2=env2
  worker:
    build: .
    port: 80
    environment:
      - ENV3=env3

```

In the above example the web service has only GLOBALFOO set, whereas the worker service has GLOBALFOO and ENV3 set.

Thanks for any help.
