new Dockerfile image and docker-compose
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
FROM node:17-slim
|
||||
RUN bash -c "apt update -y && apt install git -y && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp"
|
||||
RUN yarn global remove gancio || true
|
||||
RUN yarn cache clean
|
||||
RUN yarn global add --latest --production --silent https://gancio.org/latest.tgz
|
||||
ADD entrypoint.sh /
|
||||
RUN chmod 755 /entrypoint.sh
|
||||
ENTRYPOINT [ "/bin/sh", "/entrypoint.sh" ]
|
||||
FROM debian:stable-slim AS nodejs-base
|
||||
RUN apt-get -q update && \
|
||||
env DEBIAN_FRONTEND=noninteractive apt-get -y install nodejs && \
|
||||
apt-get clean && rm -fr /var/lib/apt/lists/*
|
||||
|
||||
FROM nodejs-base AS build
|
||||
RUN apt-get -q update && \
|
||||
env DEBIAN_FRONTEND=noninteractive apt-get -y install git yarnpkg && \
|
||||
yarnpkg global add --latest --production --silent http://192.168.10.159:8080/l.tgz && \
|
||||
apt-get clean && rm -fr /var/lib/apt/lists/*
|
||||
|
||||
FROM nodejs-base
|
||||
COPY --from=build /usr/local/share/.config/yarn/ /usr/local/share/.config/yarn/
|
||||
RUN ln -s ../share/.config/yarn/global/node_modules/.bin/gancio /usr/local/bin/gancio
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/gancio"]
|
||||
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@ version: '3'
|
||||
|
||||
services:
|
||||
gancio:
|
||||
build: .
|
||||
restart: always
|
||||
image: gancio
|
||||
image: cisti/gancio
|
||||
container_name: gancio
|
||||
environment:
|
||||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
@@ -12,8 +11,6 @@ services:
|
||||
- NODE_ENV=production
|
||||
- GANCIO_DB_DIALECT=sqlite
|
||||
- GANCIO_DB_STORAGE=./gancio.sqlite
|
||||
entrypoint: /entrypoint.sh
|
||||
command: gancio start
|
||||
volumes:
|
||||
- ./data:/home/node/data
|
||||
ports:
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
chown -R node:node /home/node
|
||||
su node -c "$*"
|
||||
|
||||
@@ -14,9 +14,8 @@ services:
|
||||
- MARIADB_RANDOM_ROOT_PASSWORD=yes
|
||||
restart: always
|
||||
gancio:
|
||||
build: .
|
||||
restart: always
|
||||
image: gancio
|
||||
image: cisti/gancio
|
||||
container_name: gancio
|
||||
environment:
|
||||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
@@ -28,8 +27,6 @@ services:
|
||||
- GANCIO_DB_DATABASE=gancio
|
||||
- GANCIO_DB_USERNAME=gancio
|
||||
- GANCIO_DB_PASSWORD=gancio
|
||||
command: gancio start
|
||||
entrypoint: /entrypoint.sh
|
||||
volumes:
|
||||
- ./data:/home/node/data
|
||||
ports:
|
||||
|
||||
@@ -16,9 +16,8 @@ services:
|
||||
ports:
|
||||
- 5432:5432
|
||||
gancio:
|
||||
build: .
|
||||
restart: always
|
||||
image: gancio
|
||||
image: cisti/gancio
|
||||
container_name: gancio
|
||||
environment:
|
||||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
@@ -30,8 +29,6 @@ services:
|
||||
- GANCIO_DB_DATABASE=gancio
|
||||
- GANCIO_DB_USERNAME=gancio
|
||||
- GANCIO_DB_PASSWORD=gancio
|
||||
command: gancio start
|
||||
entrypoint: /entrypoint.sh
|
||||
volumes:
|
||||
- ./data:/home/node/data
|
||||
ports:
|
||||
|
||||
@@ -2,9 +2,8 @@ version: '3'
|
||||
|
||||
services:
|
||||
gancio:
|
||||
build: .
|
||||
restart: always
|
||||
image: gancio
|
||||
image: cisti/gancio
|
||||
container_name: gancio
|
||||
environment:
|
||||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
@@ -12,8 +11,6 @@ services:
|
||||
- NODE_ENV=production
|
||||
- GANCIO_DB_DIALECT=sqlite
|
||||
- GANCIO_DB_STORAGE=./gancio.sqlite
|
||||
entrypoint: /entrypoint.sh
|
||||
command: gancio start
|
||||
volumes:
|
||||
- ./data:/home/node/data
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user