How can I use an arg in docker-compose command section

Viewed 157

My docker-compose file looks like this:

version: '3.3'
services:
  app:
    container_name: my_script
    image: my_script
    build:
      context: .
      dockerfile: Dockerfile
      args:
        - http_proxy=$HTTP_PROXY
        - https_proxy=$HTTPS_PROXY
        - environment
    volumes:
      - /home/me/PycharmProjects/myimportscript/logs:/app/logs
    command: >
      bash -c "python3 Main.py -env ***$environment***"

How can I use the environment arg in the command?

bash -c "python3 Main.py -env $environment"

1 Answers
Related