mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +08:00
volume config
This commit is contained in:
parent
3bc56a1814
commit
d5c1a8feda
3
.npmrc
3
.npmrc
@ -1,3 +0,0 @@
|
|||||||
@harness:registry=https://npm.pkg.github.com
|
|
||||||
//npm.pkg.github.com/:_authToken=${GITHUB_ACCESS_TOKEN}
|
|
||||||
always-auth=true
|
|
16
Dockerfile
16
Dockerfile
@ -14,7 +14,6 @@ ARG GITHUB_ACCESS_TOKEN
|
|||||||
# RUN npm ci --omit=dev
|
# RUN npm ci --omit=dev
|
||||||
|
|
||||||
COPY ./web .
|
COPY ./web .
|
||||||
COPY .npmrc /root/.npmrc
|
|
||||||
|
|
||||||
RUN yarn && yarn build && yarn cache clean
|
RUN yarn && yarn build && yarn cache clean
|
||||||
|
|
||||||
@ -70,18 +69,21 @@ RUN apk --update add ca-certificates
|
|||||||
# ---------------------------------------------------------#
|
# ---------------------------------------------------------#
|
||||||
FROM alpine/git:2.36.3 as final
|
FROM alpine/git:2.36.3 as final
|
||||||
|
|
||||||
RUN adduser -u 1001 -D -h /app iamuser
|
|
||||||
|
|
||||||
# setup app dir and its content
|
# setup app dir and its content
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN chown -R 1001:1001 /app
|
VOLUME /data
|
||||||
COPY --from=builder --chown=1001:1001 --chmod=700 /app/gitness /app/gitness
|
|
||||||
|
|
||||||
|
ENV XDG_CACHE_HOME /data
|
||||||
|
ENV GITRPC_SERVER_GIT_ROOT /data
|
||||||
|
ENV GITNESS_DATABASE_DRIVER sqlite3
|
||||||
|
ENV GITNESS_DATABASE_DATASOURCE /data/database.sqlite
|
||||||
|
ENV GITNESS_METRIC_ENABLED=true
|
||||||
|
ENV GITNESS_METRIC_ENDPOINT=https://stats.drone.ci/api/v1/gitness
|
||||||
|
|
||||||
|
COPY --from=builder /app/gitness /app/gitness
|
||||||
COPY --from=cert-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
COPY --from=cert-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
USER 1001
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/app/gitness", "server" ]
|
ENTRYPOINT [ "/app/gitness", "server" ]
|
Loading…
Reference in New Issue
Block a user