EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 44dfa823 authored by Mussab Abdalla's avatar Mussab Abdalla
Browse files

writing permission for sftp users

parent 88b2faf8
No related branches found
No related tags found
1 merge request!49Production release 1.1.1
......@@ -30,6 +30,9 @@ build-tag:
- IMAGE_6="$CI_REGISTRY_IMAGE/pvs_ingestor"
- docker pull "$IMAGE_6":latest || true
- docker build --cache-from "$IMAGE_6":latest -t "$IMAGE_6":dev -t "$IMAGE_6":$CI_COMMIT_TAG ingestor/
- IMAGE_7="$CI_REGISTRY_IMAGE/pvs_sftp"
- docker pull "$IMAGE_7":latest || true
- docker build --cache-from "$IMAGE_7":latest -t "$IMAGE_7":latest -t "$IMAGE_7":$CI_COMMIT_TAG sftp/
- cd ./testing && ./gitlab_test.sh
- if [ $? -ne 0 ]; then exit 1; fi # actually fail build
- docker push "$IMAGE_1":$CI_COMMIT_TAG
......@@ -70,6 +73,9 @@ build-master-staging:
- IMAGE_6="$CI_REGISTRY_IMAGE/pvs_ingestor"
- docker pull "$IMAGE_6":"$TAG_USED" || true
- docker build --cache-from "$IMAGE_6":"$TAG_USED" -t "$IMAGE_6":dev -t "$IMAGE_6":"$TAG_USED" ingestor/
- IMAGE_7="$CI_REGISTRY_IMAGE/pvs_sftp"
- docker pull "$IMAGE_7":latest || true
- docker build --cache-from "$IMAGE_7":latest -t "$IMAGE_7":latest -t "$IMAGE_7":$CI_COMMIT_TAG sftp/
- cd ./testing && ./gitlab_test.sh
- if [ $? -ne 0 ]; then exit 1; fi # actually fail build
- docker push "$IMAGE_1":"$TAG_USED"
......@@ -112,6 +118,9 @@ build:
- IMAGE="$CI_REGISTRY_IMAGE/pvs_ingestor"
- docker pull "$IMAGE":staging || true
- docker build --cache-from "$IMAGE":staging -t "$IMAGE":dev ingestor/
- IMAGE="$CI_REGISTRY_IMAGE/pvs_sftp"
- docker pull "$IMAGE":staging || true
- docker build --cache-from "$IMAGE":staging -t "$IMAGE":dev sftp/
- cd ./testing && ./gitlab_test.sh
- if [ $? -ne 0 ]; then exit 1; fi # actually fail build
except:
......
......@@ -173,7 +173,7 @@ services:
deploy:
replicas: 1
sftp:
image: atmoz/sftp:latest
image: registry.gitlab.eox.at/esa/prism/vs/pvs_sftp:latest
volumes:
- type: volume
source: report-data
......
......@@ -188,7 +188,7 @@ services:
deploy:
replicas: 1
sftp:
image: atmoz/sftp:latest
image: registry.gitlab.eox.at/esa/prism/vs/pvs_sftp:latest
volumes:
- type: volume
source: report-data
......
......@@ -192,7 +192,7 @@ services:
deploy:
replicas: 1
sftp:
image: atmoz/sftp:latest
image: registry.gitlab.eox.at/esa/prism/vs/pvs_sftp:latest
volumes:
- type: volume
source: report-data
......
#------------------------------------------------------------------------------
#
# Project: prism view server
# Authors: Stephan Meissl <stephan.meissl@eox.at>
#
#------------------------------------------------------------------------------
# Copyright (C) 2020 EOX IT Services GmbH <https://eox.at>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies of this Software or works derived from this Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#-----------------------------------------------------------------------------
FROM atmoz/sftp:latest
LABEL name="prism view server docker base image" \
vendor="EOX IT Services GmbH <https://eox.at>" \
license="MIT Copyright (C) 2020 EOX IT Services GmbH <https://eox.at>" \
type="prism view server docker base image" \
version="1.0.0"
RUN mkdir /etc/sftp.d
ADD entrypoint.sh /etc/sftp.d
RUN chmod -v +x /etc/sftp.d/entrypoint.sh
#!/bin/bash
echo " baloola"
for user_home in /home/* ; do
echo $user_home
if [ -d "$user_home" ]; then
username=`basename $user_home`
echo "Setup $user_home/data folder for $username"
mkdir -p $user_home/data
chown -R $username:users $user_home/data
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment