Valian / docker-nginx-auto-ssl

Docker image for automatic generation of SSL certs using Let's encrypt and Open Resty
https://hub.docker.com/r/valian/docker-nginx-auto-ssl/
MIT License
411 stars 103 forks source link

how to connect redis with docker-compose #48

Open karkovich opened 4 years ago

karkovich commented 4 years ago

Hi, I want to up redis and docker-nginx-auto-ssl with docker-compose and connect them to work together. I tried to use this configuration:

version: '3'
services:
  redis:
    container_name: redis
    image: redis

  nginx:
    container_name: nginx
    image: valian/docker-nginx-auto-ssl
    restart: on-failure
    ports:
      - 80:80
      - 443:443
    environment: 
        STORAGE_ADAPTER: redis
        REDIS_HOST: redis
        REDIS_PORT: 6379

however i'm not sure it's valid:

    REDIS_HOST: redis
    REDIS_PORT: 6379
Valian commented 4 years ago

@karkovich What's the problem you're having exactly? Could you describe it better? For now, I see you're missing some configuration options that would allow the certificate to be generated, for example, ALLOWED_DOMAINS and SITES. Refer to README to see what should be specified beside REDIS settings.