@@ -32,6 +32,21 @@ RUN apt-get update -y -q && \
3232RUN mkdir -p /var/www/concept_lib_sites/v1 && \
3333 mkdir -p /home/config_cll/cll_srvr_logs
3434
35+ # Set perms
36+ RUN chown -R www-data:www-data /var/www /home/config_cll && \
37+ chmod -R 750 /home/config_cll
38+
39+ # Cleanup
40+ RUN apt-get autoremove -y -q && \
41+ apt-get clean -y -q
42+
43+
44+ # ###################################
45+ # # ##
46+ # # Build ##
47+ # # ##
48+ # ###################################
49+ FROM base AS builder
3550# Copy script volume(s)
3651COPY ./docker/app/scripts/build /bin/scripts
3752COPY ./docker/app/scripts/init /home/config_cll/init
@@ -43,27 +58,19 @@ COPY ./docker/requirements /var/www/concept_lib_sites/v1/requirements
4358# Copy app volume(s)
4459COPY ./CodeListLibrary_project /var/www/concept_lib_sites/v1/CodeListLibrary_project
4560
46- # Set perms
47- RUN chown -R www-data:www-data /var/www /home/config_cll && \
48- chmod -R 750 /home/config_cll
49-
5061RUN find /bin/scripts -type f -iname "*.sh" -exec chmod a+x {} \; && \
5162 find /home/config_cll -type f -iname "*.sh" -exec chmod a+x {} \;
5263
5364# Config & install dependencies
5465RUN /bin/scripts/dependencies.sh /var/www/concept_lib_sites/v1/requirements/${dependency_target:-production.txt}
5566
56- # Cleanup
57- RUN apt-get autoremove -y -q && \
58- apt-get clean -y -q
59-
6067
6168# ###################################
6269# # ##
6370# # Dev ##
6471# # ##
6572# ###################################
66- FROM base AS dev
73+ FROM builder AS dev
6774WORKDIR /var/www/concept_lib_sites/v1/CodeListLibrary_project
6875
6976
@@ -72,7 +79,7 @@ WORKDIR /var/www/concept_lib_sites/v1/CodeListLibrary_project
7279# # Prod ##
7380# # ##
7481# ###################################
75- FROM base AS prod
82+ FROM builder AS prod
7683
7784# Config supervisord
7885ADD ./docker/app/config/cll.supervisord.conf /etc/supervisord.conf
0 commit comments