Skip to content

Commit aafe23b

Browse files
committed
Revert "do not mount www&ftp data"
This reverts commit c5e3a0d.
1 parent c5e3a0d commit aafe23b

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

additional-modules/storage/entrypoint.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,8 @@ chown -R ceph:ceph /var/lib/ceph/radosgw
113113
# start Apache and vsftpd (/var/www/html and /srv/ftp are volume bindings from start_ocean.sh)
114114
##
115115
echo "starting apache2 and vsftpd..."
116-
# Host dirs are created by root ; set broad perms so www-data and FTP user can write
117-
mkdir -p /var/www/html
118-
mkdir -p /srv/ftp
116+
# Host dirs are created by root in start_ocean.sh; set broad perms so www-data and FTP user can write
119117
chmod 777 /var/www/html 2>/dev/null || true
120-
chmod 777 /srv 2>/dev/null || true
121118
chmod 777 /srv/ftp 2>/dev/null || true
122119
# Create FTP user if missing, set password from env
123120
if ! id -u "$FTP_USER" >/dev/null 2>&1; then

compose-files/storage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ services:
1919
FTP_PASS: "${FTP_PASS:-ftppass}"
2020
networks:
2121
ocean_backend:
22-
ipv4_address: 172.15.0.7
22+
ipv4_address: 172.15.0.7
23+
volumes:
24+
# OCEAN_WWW_FOLDER, OCEAN_FTP_FOLDER set in start_ocean.sh (e.g. ~/.ocean/storage-www, ~/.ocean/storage-ftp)
25+
- ${OCEAN_WWW_FOLDER}:/var/www/html
26+
- ${OCEAN_FTP_FOLDER}:/srv/ftp

start_ocean.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ mkdir -p ${OCEAN_CERTS_FOLDER}
7474
# copy certs
7575
cp -r ./certs/* ${OCEAN_CERTS_FOLDER}
7676

77+
#www folder
78+
export OCEAN_WWW_FOLDER="${OCEAN_HOME}/storage-www/"
79+
mkdir -p ${OCEAN_WWW_FOLDER}
80+
#ftp folder
81+
export OCEAN_FTP_FOLDER="${OCEAN_HOME}/storage-ftp/"
82+
mkdir -p ${OCEAN_FTP_FOLDER}
83+
chmod 777 ${OCEAN_FTP_FOLDER}
7784
# FTP local user (no anonymous); set FTP_USER/FTP_PASS to override
7885
export FTP_USER="${FTP_USER:-ftpuser}"
7986
export FTP_PASS="${FTP_PASS:-ftppass}"

0 commit comments

Comments
 (0)