use new s6-rc layout
This commit is contained in:
parent
44f4af8349
commit
9160d81961
@ -1,9 +0,0 @@
|
|||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 4
|
|
@ -1,13 +1,18 @@
|
|||||||
variables:
|
variables:
|
||||||
IMAGE_NAME: thallian/koreader-sync
|
CONTAINER_NAME: thallian/koreader-sync
|
||||||
|
|
||||||
build:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
|
image:
|
||||||
|
name: gcr.io/kaniko-project/executor:debug
|
||||||
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD $DOCKER_REGISTRY
|
- mkdir -p /kaniko/.docker
|
||||||
- docker build -t $IMAGE_NAME:$CI_COMMIT_SHA .
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$(printf "%s:%s" "$CI_REGISTRY_USER" "$CI_REGISTRY_PASSWORD" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json
|
||||||
- docker build -t $IMAGE_NAME:$CI_COMMIT_REF_NAME .
|
- >-
|
||||||
- docker build -t $IMAGE_NAME:latest .
|
/kaniko/executor
|
||||||
- docker push $IMAGE_NAME:$CI_COMMIT_SHA
|
--context "$CI_PROJECT_DIR"
|
||||||
- docker push $IMAGE_NAME:$CI_COMMIT_REF_NAME
|
--dockerfile "$CI_PROJECT_DIR/Dockerfile"
|
||||||
- docker push $IMAGE_NAME:latest
|
--destination "$CONTAINER_NAME:$CI_COMMIT_SHA"
|
||||||
|
--destination "$CONTAINER_NAME:$CI_COMMIT_REF_NAME"
|
||||||
|
--destination "$CONTAINER_NAME:latest"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.14 as builder
|
FROM alpine:3.15 as builder
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
bash \
|
bash \
|
||||||
@ -25,8 +25,8 @@ RUN apk --no-cache add \
|
|||||||
RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15
|
RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15
|
||||||
RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15
|
RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15
|
||||||
|
|
||||||
ENV RESTY_VERSION=1.19.3.2
|
ENV RESTY_VERSION=1.19.9.1
|
||||||
ENV RESTY_SHA256_SUM=ce40e764990fbbeb782e496eb63e214bf19b6f301a453d13f70c4f363d1e5bb9
|
ENV RESTY_SHA256_SUM=576ff4e546e3301ce474deef9345522b7ef3a9d172600c62057f182f3a68c1f6
|
||||||
|
|
||||||
RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz
|
RUN wget https://openresty.org/download/openresty-$RESTY_VERSION.tar.gz
|
||||||
RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1
|
RUN echo "$RESTY_SHA256_SUM openresty-$RESTY_VERSION.tar.gz" | sha256sum -c - || exit 1
|
||||||
|
@ -1 +0,0 @@
|
|||||||
/var/lib/redis/ true redis 0640 0750
|
|
1
rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/dependencies
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/dependencies
Normal file
@ -0,0 +1 @@
|
|||||||
|
confd
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/with-contenv sh
|
#!/bin/sh
|
||||||
|
|
||||||
cd /app/server
|
cd /app/server
|
||||||
s6-setuidgid syncer gin start
|
s6-setuidgid syncer gin start
|
1
rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/koreader-sync/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/with-contenv sh
|
#!/bin/sh
|
||||||
|
|
||||||
exec s6-setuidgid redis redis-server /etc/redis.conf
|
exec s6-setuidgid redis redis-server /etc/redis.conf
|
1
rootfs/etc/s6-overlay/s6-rc.d/redis/type
Normal file
1
rootfs/etc/s6-overlay/s6-rc.d/redis/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
0
rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/redis
Normal file
0
rootfs/etc/s6-overlay/s6-rc.d/user/contents.d/redis
Normal file
Loading…
Reference in New Issue
Block a user