Skip to content

Commit

Permalink
Fix runonce error with sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusAhlfors committed Apr 17, 2024
1 parent 32e8a14 commit 13d24ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions InitialProjectDockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ WORKDIR /app
COPY initialProject .

# Create production build
RUN npm install
RUN npm run build
RUN npm install && npm run build

# Create archive for quick launch (86M!, so not very smart)
# For quick launch (86M!, so not ideal)
RUN git clone https://github.com/diploi/nextjs-postgresql-template-demo.git /app-quick-launch \
&& cd /app-quick-launch \
&& npm install --prefix /app-quick-launch
5 changes: 2 additions & 3 deletions diploi-runonce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ if [ ! "$(ls -A /app)" ]; then
ssh-keygen -A;

if [ "$REPOSITORY_URL" = "https://github.com/diploi/nextjs-postgresql-template-demo.git" ]; then
# Using gzipped initial files (and node modules)
# Using quick launch cached initial files
progress "Using quick launch /app";
mv /app-quick-launch/* /app
mv /app-quick-launch/.* /app
find /app-quick-launch/ -mindepth 1 -maxdepth 1 -exec mv -t /app -- {} +
rmdir /app-quick-launch
else
progress "Pulling code";
Expand Down

0 comments on commit 13d24ae

Please sign in to comment.