Code Monkey home page Code Monkey logo

Comments (5)

jackmac92 avatar jackmac92 commented on August 22, 2024 1

@jlobos was looking for the same thing, my solution was to create a boot script that runs the provided command first, then calls docker-compose up.

docker volume create --name nginx-certs

docker run \
  -v nginx-certs:/etc/letsencrypt \
  -e http_proxy=$http_proxy \
  -e domains="DOMAINS" \
  -e email="EMAIL" \
  -p 80:80 \
  -p 443:443 \
  --rm pierreprinetti/certbot:latest

docker-compose up --build

added the following to my pre-existing nginx container in docker-compose.yml

services:
    nginx:
        volumes:
            - nginx-certs:/etc/nginx/certs:ro

and added this to the end of docker-compose.yml

volumes:
    nginx-certs:

not ideal but works for now

from certbot.

jlobos avatar jlobos commented on August 22, 2024

yes works!, thanks @jackmac92

from certbot.

pierreprinetti avatar pierreprinetti commented on August 22, 2024
version: '3'
services:
  nginx:
    [...]
    volumes:
      - nginx-certs:/etc/nginx/certs:ro
[...]
volumes:
  nginx-certs:
    external:true

This is what I've done as well :)

from certbot.

KristerV avatar KristerV commented on August 22, 2024

so there's no way to start it with docker-compose or what?

  certbot:
    image: pierreprinetti/certbot:latest
    volumes:
      - nginx-certs:/etc/letsencrypt
    environment:
      - domains=example.com
      - [email protected]

This is as far as I'm getting, but it doesn't work. Only getting authrozation errors from Let's Encrypt when it tries to connect.

from certbot.

pierreprinetti avatar pierreprinetti commented on August 22, 2024

This repo is meant to be a Docker wrapper around a single command, rather than a long-running service.

Actually, having it as a service which runs the verification on its own schedule would be a good thing.

from certbot.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.