~dricottone/huttese

ref: 6476da76a8eeec0a2a48c53eefcaf3eae20c144a huttese/sr/Dockerfile -rw-r--r-- 1.9 KiB
6476da76Dominic Ricottone Refactoring 2 years ago
                                                                                
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
FROM alpine:3.15
COPY etc/apk/repositories /etc/apk/repositories
RUN wget --quiet --output-document=/etc/apk/keys/alpine@sr.ht.rsa.pub https://mirror.sr.ht/alpine/alpine@sr.ht.rsa.pub
RUN apk update
RUN apk add postfix meta.sr.ht git.sr.ht todo.sr.ht supervisor nginx fcgiwrap spawn-fcgi py3-gunicorn

# setup directories
RUN mkdir /etc/postfix/sasl && chmod 700 /etc/postfix/sasl
RUN mkdir /var/log/supervisord

# setup nginx
COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY etc/nginx/graphql.conf /etc/nginx/graphql.conf
COPY etc/nginx/headers.conf /etc/nginx/headers.conf
COPY etc/nginx/web.conf /etc/nginx/web.conf
COPY etc/nginx/http.d/test.conf /etc/nginx/http.d/test.conf
COPY --chown=nginx:nginx usr/share/nginx/html/index.html /usr/share/nginx/html/index.html
COPY --chown=nginx:nginx usr/share/nginx/html/test.cgi /usr/share/nginx/html/test.cgi
COPY --chown=nginx:nginx usr/share/nginx/html/test.php /usr/share/nginx/html/test.php
COPY etc/nginx/http.d/default.conf /etc/nginx/http.d/default.conf
COPY etc/nginx/http.d/git.conf /etc/nginx/http.d/git.conf
COPY etc/nginx/http.d/lists.conf /etc/nginx/http.d/lists.conf
COPY etc/nginx/http.d/meta.conf /etc/nginx/http.d/meta.conf
COPY etc/nginx/http.d/todo.conf /etc/nginx/http.d/todo.conf

# setup postfix
COPY etc/postfix/main.cf /etc/postfix/main.cf
COPY etc/postfix/master.cf /etc/postfix/master.cf
COPY etc/postfix/transport /etc/postfix/transport
RUN postmap /etc/postfix/transport
COPY etc/postfix/generic /etc/postfix/generic
RUN postmap /etc/postfix/generic
COPY etc/postfix/sasl/sasl_passwd /etc/postfix/sasl/sasl_passwd
RUN postmap /etc/postfix/sasl/sasl_passwd

# setup sourcehut
COPY etc/sr.ht/config.ini /etc/sr.ht/config.ini
COPY etc/sr.ht/pgp.key /etc/sr.ht/pgp.key
COPY etc/sr.ht/pgp.pubkey /etc/sr.ht/pgp.pubkey

# setup supervisor
USER root
EXPOSE 8080
COPY etc/supervisor/conf.d/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/supervisord.conf"]