set up mailhog

This commit is contained in:
Arnaud Lier 2025-02-18 11:21:27 +01:00
parent 830af4ac9b
commit eefd5d8254
5 changed files with 1876 additions and 1 deletions

View file

@ -93,6 +93,13 @@ services:
secrets:
- db_password
env_file: .env
mailhog:
restart: on-failure
build:
context: ./requirements/bonus/mailhog
dockerfile: Dockerfile
networks:
- inception
site:
restart: on-failure
build:

View file

@ -0,0 +1,13 @@
FROM alpine:3.21.2
LABEL org.opencontainers.image.authors="alier@student.42mulhouse.fr"
RUN wget https://github.com/mailhog/MailHog/releases/download/v1.0.1/MailHog_linux_arm -O /usr/local/bin/mailhog \
&& chmod +x /usr/local/bin/mailhog
ENV MH_UI_WEB_PATH=mailhog
EXPOSE 1025
EXPOSE 8025
ENTRYPOINT ["mailhog"]

View file

@ -35,4 +35,8 @@ server {
location /site {
proxy_pass http://site:3000;
}
location /mailhog {
proxy_pass http://mailhog:8025;
}
}

View file

@ -12,10 +12,11 @@ RUN ln -s /usr/bin/php84 /usr/bin/php && \
COPY tools/setup_wordpress.sh /setup_wordpress.sh
COPY conf/www.conf /etc/php84/php-fpm.d/www.conf
COPY conf/php.ini /etc/php84/php.ini
HEALTHCHECK --start-period=5s \
CMD cgi-fcgi -bind -connect 127.0.0.1:9000 || exit 1
EXPOSE 9000
ENTRYPOINT ["sh", "setup_wordpress.sh"]
ENTRYPOINT ["sh", "setup_wordpress.sh"]

File diff suppressed because it is too large Load diff