|
|
@ -47,14 +47,11 @@ cp -r "${base}"/libs .
|
|
|
|
sed -E '/^#/d;s:^FROM system$:FROM system AS base:' "${base}/Dockerfile" >Dockerfile
|
|
|
|
sed -E '/^#/d;s:^FROM system$:FROM system AS base:' "${base}/Dockerfile" >Dockerfile
|
|
|
|
|
|
|
|
|
|
|
|
# assets
|
|
|
|
# assets
|
|
|
|
cp -r "${assets}/content" .
|
|
|
|
cp "${assets}/package.json" .
|
|
|
|
|
|
|
|
cp -r "${assets}/assets/" .
|
|
|
|
|
|
|
|
awk '/new compress/{f=1}!f{print}/}),/{f=0}' <"${assets}/webpack.config.js" >webpack.config.js
|
|
|
|
sed -E '/^#/d;s:^(FROM [^ ]+$):\1 AS assets:' "${assets}/Dockerfile" >>Dockerfile
|
|
|
|
sed -E '/^#/d;s:^(FROM [^ ]+$):\1 AS assets:' "${assets}/Dockerfile" >>Dockerfile
|
|
|
|
|
|
|
|
|
|
|
|
cat >>Dockerfile <<EOF
|
|
|
|
|
|
|
|
RUN set -euxo pipefail \
|
|
|
|
|
|
|
|
; rm -f /work/static/*.gz
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# admin
|
|
|
|
# admin
|
|
|
|
sed -E '/^#/d;/^(COPY|EXPOSE|HEALTHCHECK|VOLUME|CMD) /d; s:^(.* )[^ ]*pybabel[^\\]*(.*):\1true \2:' "${admin}/Dockerfile" >>Dockerfile
|
|
|
|
sed -E '/^#/d;/^(COPY|EXPOSE|HEALTHCHECK|VOLUME|CMD) /d; s:^(.* )[^ ]*pybabel[^\\]*(.*):\1true \2:' "${admin}/Dockerfile" >>Dockerfile
|
|
|
|
|
|
|
|
|
|
|
@ -107,8 +104,8 @@ for vol in audit.py start.py mailu/ migrations/; do
|
|
|
|
volumes+=( --volume "${admin}/${vol}:/app/${vol}" )
|
|
|
|
volumes+=( --volume "${admin}/${vol}:/app/${vol}" )
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
for file in "${assets}/content/assets"/*; do
|
|
|
|
for file in "${assets}/assets"/*; do
|
|
|
|
[[ "${file}" == */vendor.js ]] && continue
|
|
|
|
[[ ! -f "${file}" || "${file}" == */vendor.js ]] && continue
|
|
|
|
volumes+=( --volume "${file}:/app/static/${file/*\//}" )
|
|
|
|
volumes+=( --volume "${file}:/app/static/${file/*\//}" )
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|