Skip to content

Unable to generate api key if the variables are in the docker compose file #134

@alpap

Description

@alpap

In the compose file the environment variables are defined and it seems to work but when i try to generate the the app key using

docker exec -it servas php artisan key:generate --force

I get the following error

In KeyGenerateCommand.php line 100:
                                                                                  
  file_get_contents(/app/.env): Failed to open stream: No such file or directory  
  servas:
    image: beromir/servas:latest
    restart: unless-stopped
    ports:
      - "80:80"
    volumes:
      - $HOME/servas:/app/database
    environment:
      - APP_NAME=Servas
      - APP_ENV=production
      - APP_KEY=
      - APP_DEBUG=false
      - APP_URL=bookmarks.someurl.com
      - SERVAS_ENABLE_REGISTRATION=true
      - SERVAS_SHOW_APP_VERSION=true
      - DB_CONNECTION=sqlite
      - DB_DATABASE=/app/database/database.sqlite
      - DB_FOREIGN_KEYS=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions