mirror of
				https://github.com/optim-enterprises-bv/Mailu.git
				synced 2025-11-03 03:28:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			36 lines
		
	
	
		
			795 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			795 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
# syntax=docker/dockerfile-upstream:1.4.3
 | 
						|
 | 
						|
# build static assets (intermediate)
 | 
						|
FROM base as static
 | 
						|
 | 
						|
COPY static/ /static/
 | 
						|
 | 
						|
RUN set -euxo pipefail \
 | 
						|
  ; gzip -k9 /static/*.ico /static/*.txt \
 | 
						|
  ; chmod a+rX-w -R /static
 | 
						|
 | 
						|
 | 
						|
# nginx image
 | 
						|
FROM base
 | 
						|
 | 
						|
ARG VERSION
 | 
						|
LABEL version=$VERSION
 | 
						|
 | 
						|
RUN set -euxo pipefail \
 | 
						|
  ; apk add --no-cache certbot nginx nginx-mod-http-brotli nginx-mod-stream nginx-mod-mail openssl \
 | 
						|
  ; rm /etc/nginx/conf.d/stream.conf
 | 
						|
 | 
						|
COPY conf/ /conf/
 | 
						|
COPY --from=static /static/ /static/
 | 
						|
COPY *.py /
 | 
						|
 | 
						|
RUN echo $VERSION >/version
 | 
						|
 | 
						|
EXPOSE 80/tcp 443/tcp 110/tcp 143/tcp 465/tcp 587/tcp 993/tcp 995/tcp 25/tcp
 | 
						|
# EXPOSE 10025/tcp 10143/tcp 14190/tcp
 | 
						|
HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://127.0.0.1:10204/health
 | 
						|
 | 
						|
VOLUME ["/certs", "/overrides"]
 | 
						|
 | 
						|
CMD /start.py
 |