-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (42 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
53 lines (42 loc) · 1.41 KB
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
43
44
45
46
47
48
49
50
51
52
53
# Utiliza la imagen base de Nginx
FROM nginx
# https://certbot.eff.org/
RUN apt-get update\
&& apt-get install -y \
certbot python3-certbot-nginx \
cron \
apache2-utils \
wget \
awscli \
jq \
curl
RUN echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ stable main" | \
tee /etc/apt/sources.list.d/azlux.list \
&& wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg \
&& apt update && apt install -y webhookd
COPY scripts /scripts
RUN chmod +x /scripts/*.sh
# nginx config files
COPY nginx.conf /etc/nginx/nginx.conf
COPY resources/utils /etc/nginx/utils
COPY resources/templates /etc/nginx/templates
# Admin panel
COPY resources/admin /var/www/admin
COPY resources/80-webhookd.sh /docker-entrypoint.d/80-webhookd.sh
COPY resources/90-cron.sh /docker-entrypoint.d/90-cron.sh
RUN chmod +x /docker-entrypoint.d/*.sh
COPY resources/crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab && \
crontab /etc/cron.d/crontab
# clean
RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /etc/cron.d/certbot
EXPOSE 80 8080 443
ENV NGINX_RESOLVER=127.0.0.1 \
WHD_HOOK_TIMEOUT=300 \
WHD_PASSWD_FILE=/etc/webhookd/users.htpasswd \
WHD_USER=webhookd \
WHD_PASSWD=
# Comando para iniciar Nginx cuando se ejecute el contenedor
CMD ["nginx", "-g", "daemon off;"]