3 changed files with 62 additions and 12 deletions
@ -0,0 +1,6 @@
|
||||
# datos de gancio |
||||
db.sqlite |
||||
config.json |
||||
uploads |
||||
user_locale |
||||
|
@ -1,21 +1,65 @@
|
||||
FROM registry.sindominio.net/debian as builder |
||||
## Docker para COMPILACION de Gancio |
||||
## |
||||
## - Descarga codigo de Framagit.org |
||||
## - Compila la libreria Gancio |
||||
## - Dependencias: nodejs + yarn |
||||
## |
||||
FROM registry.sindominio.net/debian |
||||
|
||||
RUN apt-get update && \ |
||||
apt-get install -y --no-install-recommends curl gnupg2 ca-certificates |
||||
apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git |
||||
|
||||
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list && \ |
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list |
||||
# Install Node Latest |
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ |
||||
apt-get install -y nodejs |
||||
|
||||
WORKDIR /opt |
||||
|
||||
ARG GANCIO_VERSION=master |
||||
|
||||
RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - |
||||
#RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarn-archive-keyring.gpg |
||||
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list && \ |
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \ |
||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - |
||||
|
||||
# Install Yarn |
||||
RUN apt-get update && \ |
||||
apt-get install -y --no-install-recommends yarn |
||||
apt-get install -y --no-install-recommends yarn |
||||
|
||||
RUN git clone https://framagit.org/les/gancio.git && \ |
||||
cd gancio && \ |
||||
git checkout $GANCIO_VERSION |
||||
|
||||
WORKDIR /opt/gancio |
||||
|
||||
RUN yarn install && \ |
||||
yarn build && \ |
||||
yarn pack --filename=gancio.tgz |
||||
|
||||
|
||||
|
||||
## Docker para EJECUCION de Gancio |
||||
## |
||||
## - Usa la libreria Gancio compilada antes |
||||
## - Instala todas las dependencias de produccion |
||||
## - Crea un link en /usr/local/bin/gancio |
||||
## - Dependencias: nodejs |
||||
## |
||||
FROM registry.sindominio.net/debian |
||||
|
||||
RUN apt-get update && \ |
||||
apt-get install -y --no-install-recommends curl gnupg2 ca-certificates git |
||||
|
||||
# Install Node Latest |
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - |
||||
RUN apt-get install -y nodejs |
||||
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ |
||||
apt-get install -y nodejs |
||||
|
||||
COPY --from=0 /opt/gancio/gancio.tgz ./ |
||||
|
||||
RUN tar zxf gancio.tgz && \ |
||||
mv package gancio && \ |
||||
rm gancio.tgz |
||||
|
||||
WORKDIR /gancio |
||||
|
||||
WORKDIR / |
||||
RUN yarn global add gancio |
||||
RUN npm install --production && \ |
||||
ln -s /gancio/server/cli.js /usr/local/bin/gancio |
||||
|
Loading…
Reference in new issue