mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
🐳 🚧 Build release images
This commit is contained in:
parent
8dcf575af2
commit
3447be86fb
2 changed files with 23 additions and 12 deletions
|
@ -39,8 +39,6 @@ RUN apt-get update && \
|
|||
cd .. && \
|
||||
rm -rf ./imagemagick
|
||||
|
||||
ENV NVM_DIR="/home/uxbox/.nvm"
|
||||
|
||||
RUN useradd -m -g users -s /bin/bash uxbox; \
|
||||
passwd uxbox -d; \
|
||||
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
@ -48,16 +46,24 @@ RUN useradd -m -g users -s /bin/bash uxbox; \
|
|||
USER uxbox
|
||||
WORKDIR /home/uxbox
|
||||
|
||||
ENV NODE_VERSION=7.7.1
|
||||
|
||||
COPY ./scripts/lein /home/uxbox/.local/bin/lein
|
||||
RUN git clone https://github.com/creationix/nvm.git .nvm; \
|
||||
bash -c "source .nvm/nvm.sh && nvm install v7.7.1"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm alias default v7.7.1"; \
|
||||
bash -c ".nvm/nvm.sh"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm install $NODE_VERSION"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm alias default $NODE_VERSION"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm use default"; \
|
||||
bash -c "/home/uxbox/.local/bin/lein version"
|
||||
|
||||
# add node and npm to path so the commands are available
|
||||
ENV NVM_DIR /home/uxbox/.nvm
|
||||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
|
||||
|
||||
# Copy backend source and build release
|
||||
COPY ./* /home/uxbox/backend/
|
||||
RUN bash -c "/home/uxbox/backend/scripts/dist"
|
||||
RUN ls - l; \
|
||||
bash -c "/home/uxbox/backend/scripts/dist"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@ RUN apt-get update && \
|
|||
cd .. && \
|
||||
rm -rf ./imagemagick
|
||||
|
||||
ENV NVM_DIR="/home/uxbox/.nvm"
|
||||
|
||||
RUN useradd -m -g users -s /bin/bash uxbox; \
|
||||
passwd uxbox -d; \
|
||||
echo "uxbox ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
@ -48,18 +46,25 @@ RUN useradd -m -g users -s /bin/bash uxbox; \
|
|||
USER uxbox
|
||||
WORKDIR /home/uxbox
|
||||
|
||||
ENV NODE_VERSION=7.7.1
|
||||
|
||||
COPY ./scripts/lein /home/uxbox/.local/bin/lein
|
||||
RUN git clone https://github.com/creationix/nvm.git .nvm; \
|
||||
bash -c "source .nvm/nvm.sh && nvm install v7.7.1"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm alias default v7.7.1"; \
|
||||
bash -c ".nvm/nvm.sh"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm install $NODE_VERSION"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm alias default $NODE_VERSION"; \
|
||||
bash -c "source .nvm/nvm.sh && nvm use default"; \
|
||||
bash -c "/home/uxbox/.local/bin/lein version"
|
||||
|
||||
# add node and npm to path so the commands are available
|
||||
ENV NVM_DIR /home/uxbox/.nvm
|
||||
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
|
||||
|
||||
ENV API_URL http://127.0.0.1:6060/api
|
||||
|
||||
# Copy frontend source and build release
|
||||
COPY ./* /home/uxbox/frontend/
|
||||
RUN cd /home/uxbox/frontend; \
|
||||
RUN cd /frontend; \
|
||||
sed -i \
|
||||
-e 's/"uxbox.config.url" ".*"/"uxbox.config.url" "${API_URL}/api"/g' \
|
||||
scripts/figwheel.clj; \
|
||||
|
|
Loading…
Reference in a new issue