Clean backend container
This commit is contained in:
parent
2ce348a7ed
commit
a82ccb10ec
3 changed files with 44 additions and 10 deletions
21
entrypoint.sh
Executable file
21
entrypoint.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p /var/www/fic-server/logs; \
|
||||
chown -R www-data:www-data /var/www/fic-server/shared /var/www/fic-server/PKI; \
|
||||
chown -R synchro:www-data /var/www/fic-server/submission /var/www/fic-server/logs /var/www/fic-server/out; \
|
||||
chmod 660 /var/www/fic-server/submission; \
|
||||
./nginx_gen_team.sh > ./shared/nginx-teams.conf &&
|
||||
cat <<EOF > /var/www/fic-server/onyx/db/docker.profile.php &&
|
||||
<?php
|
||||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
\$___profile['db'] = '$DB_ENV_MYSQL_DATABASE';
|
||||
\$___profile['host'] = '$DB_PORT_3306_TCP_ADDR';
|
||||
\$___profile['user'] = '$DB_ENV_MYSQL_USER';
|
||||
\$___profile['pass'] = '$DB_ENV_MYSQL_PASSWORD';
|
||||
EOF
|
||||
sed -i 's/"profile">sample</"profile">docker</' /var/www/fic-server/onyx/config/root.xml &&
|
||||
# echo 'Copying files...' &&
|
||||
# ./gen_hash_link_files.sh --copy ./files-in ./files &&
|
||||
exec "$@"
|
||||
Reference in a new issue