Skip to content
Snippets Groups Projects
Commit 1baff38d authored by Griefed's avatar Griefed :joystick:
Browse files

/code dir and further configs

parent 493b0dd9
No related branches found
No related tags found
No related merge requests found
...@@ -94,4 +94,4 @@ COPY root/ / ...@@ -94,4 +94,4 @@ COPY root/ /
# Communicate ports and volumes to be used # Communicate ports and volumes to be used
EXPOSE 8080 EXPOSE 8080
VOLUME /config /data /plugins VOLUME /config /data /plugins /code
...@@ -28,6 +28,7 @@ services: ...@@ -28,6 +28,7 @@ services:
image: griefed/icecoder image: griefed/icecoder
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ./icecoder/code:/code
- ./icecoder/config:/config - ./icecoder/config:/config
- ./icecoder/data:/data - ./icecoder/data:/data
- ./icecoder/plugins:/plugins - ./icecoder/plugins:/plugins
...@@ -44,10 +45,11 @@ services: ...@@ -44,10 +45,11 @@ services:
Configuration | Explanation Configuration | Explanation
------------ | ------------- ------------ | -------------
restart | [Restart policy](https://docs.docker.com/compose/compose-file/#restart) Either: "no", always, on-failure, unless-stopped [Restart policy](https://docs.docker.com/compose/compose-file/#restart) | "no", always, on-failure, unless-stopped
volumes | /config contains all relevant configuration files. code volume | Contains GITURL repository.
volumes | /data contains all relevant data like code. /data/code is the directory where GITURL is cloned into, for example. config volume | Contains config files and logs.
volumes | /plugins contains all plugin files. data volume | Contains ICEcoder data like backups.
plugins volume | Contains all plugin files.
GITURL | Specify a GitHub repository to checkout on first run of the container. GITURL | Specify a GitHub repository to checkout on first run of the container.
TZ | Timezone TZ | Timezone
PUID | for UserID PUID | for UserID
......
...@@ -10,11 +10,11 @@ if [ ! -e /lock.file ]; then ...@@ -10,11 +10,11 @@ if [ ! -e /lock.file ]; then
-i /etc/sudoers -i /etc/sudoers
sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group sed -e 's/^wheel:\(.*\)/wheel:\1,abc/g' -i /etc/group
# create directory for project # create directory for project
mkdir -p /data/code mkdir -p /code/ICEcoder
# make sure URL is set and folder is empty to clone code # make sure URL is set and folder is empty to clone code
if [ ${GITURL+x} ] && [ ! "$(/bin/ls -A /data/code 2>/dev/null)" ] ; then \ if [ ${GITURL+x} ] && [ ! "$(/bin/ls -A /data/code/ICEcoder 2>/dev/null)" ] ; then \
# clone the url the user passed to this directory # clone the url the user passed to this directory
git clone "${GITURL}" /data/code git clone "${GITURL}" /code/ICEcoder
fi fi
else else
# lock exists not importing project this is a restart # lock exists not importing project this is a restart
...@@ -36,6 +36,7 @@ cp /config/php/php.ini /etc/php7/php.ini ...@@ -36,6 +36,7 @@ cp /config/php/php.ini /etc/php7/php.ini
# Link data, code and plugins # Link data, code and plugins
sudo -u abc ln -sf /data /app/ICEcoder/data sudo -u abc ln -sf /data /app/ICEcoder/data
sudo -u abc ln -sf /plugins /app/ICEcoder/plugins sudo -u abc ln -sf /plugins /app/ICEcoder/plugins
sudo -u abc ln -sf /code /app/ICEcoder/code
# permissions # permissions
mkdir -p /config/sessions mkdir -p /config/sessions
...@@ -45,10 +46,12 @@ chown -R abc:abc \ ...@@ -45,10 +46,12 @@ chown -R abc:abc \
/app/ICEcoder \ /app/ICEcoder \
/data \ /data \
/config \ /config \
/plugins /plugins \
/code
chmod -R 775 \ chmod -R 775 \
/app/ICEcoder \ /app/ICEcoder \
/data \ /data \
/config \ /config \
/plugins /plugins \
/code
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