Skip to content

Commit 077173e

Browse files
authored
Merge pull request #136 from PROCOLLAB-github/CU-85zt0e0vw_emails
Cu 85zt0e0vw emails
2 parents 1ec23c3 + 746e387 commit 077173e

5 files changed

Lines changed: 36 additions & 2 deletions

File tree

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea/
2+
.git/
3+
.github/

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,5 @@ dmypy.json
135135

136136
cache
137137

138-
staticfiles
138+
staticfiles
139+
/emails/

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
FROM node:16 as emails
2+
3+
RUN mkdir build
4+
WORKDIR /build
5+
6+
COPY ./scripts ./scripts
7+
8+
RUN ["chmod", "+x", "./scripts/build-emails.sh"]
9+
RUN bash ./scripts/build-emails.sh
10+
111
FROM python:3.9
212

313
RUN apt update --no-install-recommends -y
@@ -18,15 +28,18 @@ WORKDIR /procollab
1828

1929
COPY poetry.lock pyproject.toml /procollab/
2030

31+
2132
RUN poetry config virtualenvs.create false \
2233
&& poetry install --no-root
2334

35+
COPY --from=emails /email ./emails/
36+
2437
EXPOSE 8000
2538

2639
RUN mkdir /procollab/staticfiles
2740
RUN mkdir /procollab/static
2841

2942
COPY . /procollab/
3043

31-
CMD ["bash", "startup.sh"]
44+
CMD ["bash", "./scripts/startup.sh"]
3245

scripts/build-emails.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# In order to use this script
4+
# machine should have installed:
5+
# - git
6+
# - node^16
7+
8+
cd ..
9+
git clone https://github.com/PROCOLLAB-github/emails.git
10+
cd emails || exit
11+
12+
npm ci
13+
npm run build
14+
15+
cd ..
16+
cp -R ./emails/dist ./email
17+
rm -rf ./emails
File renamed without changes.

0 commit comments

Comments
 (0)