-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
42 lines (40 loc) · 1.51 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: '3'
services:
proxy:
image: traefik:2.5
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
- --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https
- --entrypoints.websecure.address=:443
- --certificatesResolvers.main-resolver.acme.httpChallenge=true
- --certificatesResolvers.main-resolver.acme.httpChallenge.entrypoint=web
- --certificatesResolvers.main-resolver.acme.email=${LETSENCRYPT_EMAIL:?No Let's Encrypt email set}
- --certificatesResolvers.main-resolver.acme.storage=/letsencrypt/acme.json
restart: always
ports:
- 80:80
- 443:443
volumes:
- cert-data:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
web-service:
image: newdeveloper/apache-php
volumes:
- .:/var/www/html
- ./infraestructura/etc/apache2/apache2.conf:/etc/apache2/apache2.conf
labels:
- traefik.enable=true
- traefik.http.services.frontend.loadbalancer.server.port=80
- traefik.http.routers.frontend-http.entrypoints=websecure
- traefik.http.routers.frontend-http.tls.certresolver=main-resolver
- traefik.http.routers.frontend-http.rule=Host(`${DOLLY_DOMAIN:?No Dolly domain set}`)
analitycs:
build: .
volumes:
- .:/var/www/html #This is because the script search the files here.
working_dir: /var/www/html
volumes:
cert-data: