Community maintained Docker config for the spindle server

Compare changes

Choose any two refs to compare.

Changed files
+22 -23
rootfs
etc
s6-overlay
s6-rc.d
knotserver
dependencies.d
run
spindleserver
dependencies.d
run
user
+4 -4
Dockerfile
···
RUN go build -o /usr/bin/spindle -ldflags '-s -w -extldflags "-static"' ./cmd/spindle
FROM alpine:edge
-
EXPOSE 5555
-
EXPOSE 22
+
+
ARG PORT=6555
+
EXPOSE $PORT
LABEL org.opencontainers.image.title='spindle'
LABEL org.opencontainers.image.description='CI runner for tangled'
···
COPY --from=builder /usr/bin/spindle /usr/bin
RUN mkdir /app && chown -R spindle:spindle /app
-
ARG 6555
HEALTHCHECK --interval=60s --timeout=30s --start-period=5s --retries=3 \
-
cmd curl -f http://localhost:$PORT || exit 1
+
CMD curl -f http://localhost:${PORT} || exit 1
ENTRYPOINT ["/init"]
+14 -15
docker-compose.yml
···
services:
-
knot:
+
spindle:
build:
context: .
args:
UID: 1000
GID: 1000
+
PORT: ${INTERNAL_PORT:-6555}
environment:
-
KNOT_SERVER_HOSTNAME: ${KNOT_SERVER_HOSTNAME}
-
KNOT_SERVER_OWNER: ${KNOT_SERVER_OWNER}
-
KNOT_SERVER_DB_PATH: /app/knotserver.db
-
KNOT_REPO_SCAN_PATH: /home/git/repositories
-
KNOT_SERVER_INTERNAL_LISTEN_ADDR: localhost:5444
+
SPINDLE_SERVER_HOSTNAME: ${SPINDLE_SERVER_HOSTNAME}
+
SPINDLE_SERVER_OWNER: ${SPINDLE_SERVER_OWNER}
+
SPINDLE_SERVER_DB_PATH: /app/spindle.db
+
SPINDLE_SERVER_LISTEN_ADDR: localhost:6555
+
SPINDLE_PIPELINES_LOG_DIR: /var/log/spindle
+
PORT: ${INTERNAL_PORT:-6555}
volumes:
-
- ./keys:/etc/ssh/keys
-
- ./repositories:/home/git/repositories
- ./server:/app
ports:
-
- "5555:5555"
-
- "2222:22"
+
- "${INTERNAL_PORT:-6555}:${INTERNAL_PORT:-6555}"
restart: always
frontend:
image: caddy:alpine
command: >
caddy
reverse-proxy
-
--from ${KNOT_SERVER_HOSTNAME}
-
--to knot:5555
+
--from ${SPINDLE_SERVER_HOSTNAME}
+
--to spindle:6555
depends_on:
-
- knot
+
- spindle
ports:
-
- ${KNOT_SERVER_PORT:-443}:443
-
- ${KNOT_SERVER_PORT:-443}:443/udp
+
- ${SPINDLE_SERVER_PORT:-443}:443
+
- ${SPINDLE_SERVER_PORT:-443}:443/udp
volumes:
- ./caddy_data:/data
restart: always
rootfs/etc/s6-overlay/s6-rc.d/knotserver/dependencies.d/base

This is a binary file and will not be displayed.

-3
rootfs/etc/s6-overlay/s6-rc.d/knotserver/run
···
-
#!/command/with-contenv ash
-
-
exec s6-setuidgid git /usr/bin/knot server
-1
rootfs/etc/s6-overlay/s6-rc.d/knotserver/type
···
-
longrun
rootfs/etc/s6-overlay/s6-rc.d/spindleserver/dependencies.d/base

This is a binary file and will not be displayed.

+3
rootfs/etc/s6-overlay/s6-rc.d/spindleserver/run
···
+
#!/command/with-contenv ash
+
+
exec s6-setuidgid spindle /usr/bin/spindle server
+1
rootfs/etc/s6-overlay/s6-rc.d/spindleserver/type
···
+
longrun
rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/knotserver

This is a binary file and will not be displayed.

rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/spindleserver

This is a binary file and will not be displayed.