5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 21:26:21 +00:00

Merge branch 'distributed-press' into panel.sutty.nl

This commit is contained in:
f 2023-02-06 16:13:39 -03:00
commit 2e68eb7178
2 changed files with 21 additions and 0 deletions

View file

@ -18,6 +18,7 @@ RUN apk add --no-cache libxslt libxml2 postgresql-libs libssh2 \
RUN gem install --no-document --no-user-install foreman RUN gem install --no-document --no-user-install foreman
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc
RUN apk add npm && npm install -g pnpm && apk del npm
COPY ./monit.conf /etc/monit.d/sutty.conf COPY ./monit.conf /etc/monit.d/sutty.conf

View file

@ -15,6 +15,7 @@ class DeployLocal < Deploy
def deploy(output: false) def deploy(output: false)
return false unless mkdir return false unless mkdir
return false unless yarn(output: output) return false unless yarn(output: output)
return false unless pnpm(output: output)
return false unless bundle(output: output) return false unless bundle(output: output)
jekyll_build(output: output) jekyll_build(output: output)
@ -91,6 +92,10 @@ class DeployLocal < Deploy
Rails.root.join('_yarn_cache').to_s Rails.root.join('_yarn_cache').to_s
end end
def pnpm_cache_dir
Rails.root.join('_pnpm_cache').to_s
end
def yarn_lock def yarn_lock
File.join(site.path, 'yarn.lock') File.join(site.path, 'yarn.lock')
end end
@ -103,6 +108,21 @@ class DeployLocal < Deploy
run %(gem install bundler --no-document), output: output run %(gem install bundler --no-document), output: output
end end
def pnpm_lock
File.join(site.path, 'pnpm-lock.yaml')
end
def pnpm_lock?
File.exist? pnpm_lock
end
def pnpm(output: false)
return true unless pnpm_lock?
run %(pnpm config set store-dir "#{pnpm_cache_dir}"), output: output
run 'pnpm install --production', output: output
end
# Corre yarn dentro del repositorio # Corre yarn dentro del repositorio
def yarn(output: false) def yarn(output: false)
return true unless yarn_lock? return true unless yarn_lock?