@@ -47,6 +47,8 @@ run_with_apt_cache \
47
47
install_perl && \
48
48
install_cpanm_and_carton && \
49
49
python3.13 -m ensurepip --upgrade && \
50
+ # aiosmtpd needed for the smtp service.
51
+ python3.13 -m pip install --break-system-packages aiosmtpd && \
50
52
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && \
51
53
locale-gen && \
52
54
# Allow the musicbrainz user execute any command with sudo.
@@ -154,6 +156,18 @@ RUN sudo -E -H -u musicbrainz git clone https://github.com/metabrainz/artwork-re
154
156
155
157
COPY docker/musicbrainz-tests/artwork-redirect-config.ini artwork-redirect/config.ini
156
158
159
+ FROM build AS mb_mail_service
160
+
161
+ ARG MB_MAIL_SERVICE_TAG=v0.4.9
162
+
163
+ ENV PATH="/root/.cargo/bin:${PATH}"
164
+
165
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none && \
166
+ sudo -E -H -u musicbrainz git clone https://github.com/metabrainz/mb-mail-service.git && \
167
+ cd mb-mail-service && \
168
+ sudo -E -H -u musicbrainz git reset --hard $MB_MAIL_SERVICE_TAG && \
169
+ cargo build --release
170
+
157
171
FROM build AS node_modules
158
172
159
173
COPY --chown=musicbrainz:musicbrainz .yarnrc.yml package.json yarn.lock MBS_ROOT/
@@ -214,6 +228,7 @@ COPY --from=pgdata --chown=postgres:postgres "$PGHOME"/ "$PGHOME"/
214
228
COPY --from=pg_amqp --chown=musicbrainz:musicbrainz /home/musicbrainz/pg_amqp/target/ /
215
229
COPY --from=sir --chown=musicbrainz:musicbrainz /home/musicbrainz/sir/ /home/musicbrainz/sir/
216
230
COPY --from=artwork_redirect --chown=musicbrainz:musicbrainz /home/musicbrainz/artwork-redirect/ /home/musicbrainz/artwork-redirect/
231
+ COPY --from=mb_mail_service --chown=musicbrainz:musicbrainz /home/musicbrainz/mb-mail-service/target/release/mb-mail-service /usr/local/bin/
217
232
COPY --from=node_modules --chown=musicbrainz:musicbrainz MBS_ROOT/node_modules/ MBS_ROOT/node_modules/
218
233
COPY --chmod=0755 docker/musicbrainz-tests/service/ /etc/service/
219
234
@@ -224,8 +239,10 @@ COPY --chmod=0755 \
224
239
RUN setup_test_service(`artwork-indexer') && \
225
240
setup_test_service(`artwork-redirect') && \
226
241
setup_test_service(`chrome') && \
242
+ setup_test_service(`mb-mail-service') && \
227
243
setup_test_service(`postgresql') && \
228
244
setup_test_service(`redis') && \
245
+ setup_test_service(`smtp') && \
229
246
setup_test_service(`solr') && \
230
247
setup_test_service(`ssssss') && \
231
248
setup_test_service(`template-renderer') && \
0 commit comments