title: Set secret variable when using Docker in TravisCI
body: <p>I build a backend with NodeJS and would like to use TravisCI and Docker to run tests.</p>
  
  <p>In my code, I have a secret env: process.env.SOME_API_KEY</p>
  
  <p>This is my Dockerfile.dev</p>
  
  <pre><code>FROM node:alpine
  WORKDIR /app
  COPY package.json .
  RUN npm install
  COPY . .
  CMD ["npm", "run", "dev"]
  </code></pre>
  
  <p>My docker compose:</p>
  
  <pre><code>version: "3"
  services:
    api:
      build:
        context: .
        dockerfile: Dockerfile.dev
      volumes:
      - /app/node_modules
      - .:/app
      ports:
      - "3000:3000"
      depends_on:
      - mongo
    mongo:
      image: mongo:4.0.6
      ports:
      - "27017:27017"
  </code></pre>
  
  <p>And this is my TravisCI </p>
  
  <pre><code>sudo: required
  services:
    - docker
  
  before_script:
    - docker-compose up -d --build
  
  script:
    - docker-compose exec api npm run test
  </code></pre>
  
  <p>I also set SOME_API_KEY='xxx' in my travis setting variables. However, it seems that the container doesn't receive the SOME_API_KEY. </p>
  
  <p>How can I pass the SOME_API_KEY from travisCI to docker? Thanks</p>