How do I put my certificate on docker?

Hello, I’m a student and for a while i’ve been doing a school’s project. We got a domain in Freenom, got a docker-compose.webapps.yml and docker-compose.traefik.yml and I also created a certificate with Zerossl. Now I need to put it on my docker but I don’t know how and our teacher is not giving us any help. I attached you the docker-compose files information so you may find a way to solve my problem.

My domain is: www.hostingportatil.tk (it’s only in a private network)

My web server is (include version): Apache 2.4

I can login to a root shell on my machine (yes or no, or I don’t know): Yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No.

docker-compose.traefik.yml info:

version: ‘3.3’

networks:
proxy:
external:
name: proxy

configs:
traefik_toml_v2:
file: ./traefik.toml
nginx_conf:
file: ./nginx-redirect.conf

secrets:
traefik_cert:
file: ./tls/cert.pem
traefik_key:
file: ./tls/key.pem

services:
traefik:
image: traefik:1.4
deploy:
replicas: 2
placement:
constraints:
- node.role == manager
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- proxy
ports:
- target: 80
protocol: tcp
published: 80
mode: ingress
- target: 443
protocol: tcp
published: 443
mode: ingress
- target: 8080
protocol: tcp
published: 8080
mode: ingress
configs:
- source: traefik_toml_v2
target: /etc/traefik/traefik.toml
mode: 444
secrets:
- source: traefik_cert
target: cert.pem
uid: “0”
mode: 400
- source: traefik_key
target: key.pem
uid: “0”
mode: 400
nginx_redirect:
image: nginx:1.13
networks:
- proxy
deploy:
replicas: 2
labels:
- traefik.frontend.entryPoints=http
- traefik.frontend.rule=PathPrefix:/
- traefik.docker.network=proxy
- traefik.port=80
- traefik.enable=true
configs:
- source: nginx_conf
target: /etc/nginx/conf.d/default.conf
mode: 444

docker-compose.webapps.yml info:
version: ‘3.3’

networks:
proxy:
external: true

services:

ftpserver:
#image: vsftpdjoan:v0.1
image: fauria/vsftpd
ports:
- “21:21”
- “20:20”
- “21100-21110:21100-21110”
networks:
- proxy
env_file:
- ./.env
volumes:
- type: volume
source: volum_dades_client
target: /home/vsftpd/admin
deploy:
replicas: 1
restart_policy:
condition: on-failure
nginx:
image: nginx:1.13
networks:
- proxy
deploy:
replicas: 2
labels:
- traefik.frontend.rule=PathPrefixStrip:/nginx
- traefik.docker.network=proxy
- traefik.port=80
- traefik.enable=true
apache:
image: httpd:2.4
networks:
- proxy
env_file:
- ./.env
volumes:
- type: volume
source: volum_dades_client
target: /usr/local/apache2/htdocs
deploy:
replicas: 2
labels:
- traefik.frontend.rule=PathPrefixStrip:/apache
- traefik.docker.network=proxy
- traefik.port=80
- traefik.enable=true
caddy:
image: abiosoft/caddy:0.10.7
networks:
- proxy
deploy:
replicas: 2
labels:
- traefik.frontend.rule=PathPrefixStrip:/caddy
- traefik.docker.network=proxy
- traefik.port=2015
- traefik.enable=true

volumes:
volum_dades_client:

Hi @victo83

that's not possible using http validation. Your ip address is private - https://check-your-website.server-daten.de/?q=hostingportatil.tk

Host T IP-Address is auth. ∑ Queries ∑ Timeout
hostingportatil.tk A yes 1 0
AAAA yes
www.hostingportatil.tk A 192.168.1.11
No Hostname found yes 1 0
AAAA yes

Please start with some basics:

Then read something about challenge types:

http validation -> a public visible ip address is required, not a private ip address 192.168.*

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.