GMOD / docker-apollo

:whale: Apollo 2.X Docker Image
GNU General Public License v3.0
10 stars 12 forks source link

add docker-apollo doc for adding the temp data directory / create temporary data #44

Closed nathandunn closed 5 years ago

nathandunn commented 5 years ago

Based on the volume mounted, need to add the temporary directory

e.g., chmod -R 777 temporary/ ubuntu@ip-172-30-0-60:~/apollo_data$ pwd /home/ubuntu/apollo_data

nathandunn commented 5 years ago

Current we do this for the DB:

WEBAPOLLO_DB_DATA="/var/lib/postgresql/9.6/main"

if [ ! -e ${WEBAPOLLO_DB_DATA} ]; then
        mkdir -p ${WEBAPOLLO_DB_DATA}
        chown -R postgres:postgres ${WEBAPOLLO_DB_DATA}
fi

if [ ! -e "${WEBAPOLLO_DB_DATA}/PG_VERSION" ];then
        su -c "/usr/lib/postgresql/9.6/bin/initdb -D ${WEBAPOLLO_DB_DATA}" postgres
fi
nathandunn commented 5 years ago

something like:

WEBAPOLLO_COMMON_DATA="/data/temporary/apollo_data"

if [ ! -e ${WEBAPOLLO_COMMON_DATA} ]; then
        mkdir -p ${WEBAPOLLO_COMMON_DATA}
       # chown -R postgres:postgres ${WEBAPOLLO_COMMON_DATA}
       chmod -R 0755  ${WEBAPOLLO_COMMON_DATA}
fi

if [ ! -e "${WEBAPOLLO_COMMON_DATA}/test_file" ];then
        touch "${WEBAPOLLO_COMMON_DATA}/test_file"
fi