Commit 35c7d1b7 authored by TonyFord's avatar TonyFord
Browse files

export users ids

parent 5dd64334
......@@ -13,6 +13,9 @@ build-jekyll:
- master
variables:
- $CMD =~ /build/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
script:
- docker-compose down
- docker-compose build
......@@ -27,6 +30,8 @@ start-jekyll:
variables:
- $CMD =~ /build|start/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
- chmod +x ./script/getdata.py
script:
- docker-compose stop
......
......@@ -114,10 +114,10 @@ RUN gem install jekyll -v$JEKYLL_VERSION -- \
RUN bundle install
# --
ARG GITLAB_RUNNER_GID
ARG GITLAB_RUNNER_UID
RUN addgroup -Sg $GITLAB_RUNNER_GID jekyll
RUN adduser -Su $GITLAB_RUNNER_UID -G \
ARG RUNNER_GID
ARG RUNNER_UID
RUN addgroup -Sg $RUNNER_GID jekyll
RUN adduser -Su $RUNNER_UID -G \
jekyll jekyll
# --
......
......@@ -29,6 +29,4 @@ Go Gitlab **Settings** -> **CI/CD** -> **Variables**
#### FairCoin.Co group variables ######################
FAIRCOIN_CONF # faircoin.conf file
LH_PORT_pulse # jekyll serve -p
GITLAB_RUNNER_UID # user id of gitlab-runner ssh account on server, check it with command (id -u)
GITLAB_RUNNER_GID # group id of gitlab-runner ssh account on server, check it with command (id -g)
~~~
......@@ -6,14 +6,14 @@ services:
build:
context: ./
args:
GITLAB_RUNNER_UID: "${GITLAB_RUNNER_UID}"
GITLAB_RUNNER_GID: "${GITLAB_RUNNER_GID}"
RUNNER_UID: "${RUNNER_UID}"
RUNNER_GID: "${RUNNER_GID}"
env_file:
- ${FAIRCOIN_CONF}
container_name: ${CI_PROJECT_NAME}-jekyll-server
restart: always
command: jekyll serve --port ${LH_PORT_pulse}
user: "${GITLAB_RUNNER_UID}:${GITLAB_RUNNER_GID}"
user: "${RUNNER_UID}:${RUNNER_GID}"
network_mode: "host"
volumes:
- .:/srv/jekyll
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment