mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 11:58:51 +00:00
[ticket/16553] Use env variables in Codespaces for server name
PHPBB3-16553
This commit is contained in:
parent
558b8ae7ed
commit
874fb7bf8a
2 changed files with 9 additions and 1 deletions
|
@ -30,7 +30,7 @@ installer:
|
||||||
server:
|
server:
|
||||||
cookie_secure: false
|
cookie_secure: false
|
||||||
server_protocol: http://
|
server_protocol: http://
|
||||||
force_server_vars: false
|
force_server_vars: true
|
||||||
server_name: localhost
|
server_name: localhost
|
||||||
server_port: 80
|
server_port: 80
|
||||||
script_path: /
|
script_path: /
|
||||||
|
|
|
@ -34,6 +34,14 @@ sudo ln -s /workspaces/phpbb/phpBB /var/www/html
|
||||||
echo "[Codespaces] Copy phpBB configuration"
|
echo "[Codespaces] Copy phpBB configuration"
|
||||||
cp /workspaces/phpbb/.devcontainer/resources/phpbb-config.yml /workspaces/phpbb/phpBB/install/install-config.yml
|
cp /workspaces/phpbb/.devcontainer/resources/phpbb-config.yml /workspaces/phpbb/phpBB/install/install-config.yml
|
||||||
|
|
||||||
|
# Force the server URL to reflect the Codespace
|
||||||
|
# https://docs.github.com/en/codespaces/developing-in-a-codespace/default-environment-variables-for-your-codespace
|
||||||
|
if [ "$CODESPACES" = true ] ; then
|
||||||
|
echo "[Codespaces] Set the phpBB server name using default environment variables"
|
||||||
|
codespaces_url="${CODESPACE_NAME}-80.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
|
||||||
|
sed -i "s/localhost/$codespaces_url/g" /workspaces/phpbb/phpBB/install/install-config.yml
|
||||||
|
fi
|
||||||
|
|
||||||
# Install phpBB
|
# Install phpBB
|
||||||
echo "[Codespaces] Run phpBB CLI installation"
|
echo "[Codespaces] Run phpBB CLI installation"
|
||||||
cd /workspaces/phpbb/phpBB && composer install --no-interaction
|
cd /workspaces/phpbb/phpBB && composer install --no-interaction
|
||||||
|
|
Loading…
Add table
Reference in a new issue