mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-14 04:34:07 +02:00
[ticket/17086] Add devcontainer configuration for Codespaces
PHPBB3-17086
This commit is contained in:
38
.devcontainer/resources/phpbb-config.yml
Normal file
38
.devcontainer/resources/phpbb-config.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
installer:
|
||||
admin:
|
||||
name: admin
|
||||
password: mypassword
|
||||
email: admin@example.org
|
||||
|
||||
board:
|
||||
lang: en
|
||||
name: My Board
|
||||
description: My amazing new phpBB board
|
||||
|
||||
database:
|
||||
dbms: mysqli
|
||||
dbhost: 127.0.0.1
|
||||
dbport: 3306
|
||||
dbuser: phpbb
|
||||
dbpasswd: phpbb
|
||||
dbname: phpbb
|
||||
table_prefix: phpbb_
|
||||
|
||||
email:
|
||||
enabled: false
|
||||
smtp_delivery : ~
|
||||
smtp_host: ~
|
||||
smtp_port: ~
|
||||
smtp_auth: ~
|
||||
smtp_user: ~
|
||||
smtp_pass: ~
|
||||
|
||||
server:
|
||||
cookie_secure: false
|
||||
server_protocol: http://
|
||||
force_server_vars: false
|
||||
server_name: localhost
|
||||
server_port: 80
|
||||
script_path: /
|
||||
|
||||
extensions: []
|
44
.devcontainer/resources/setup.sh
Normal file
44
.devcontainer/resources/setup.sh
Normal file
@@ -0,0 +1,44 @@
|
||||
# setup.sh
|
||||
# Commands to install and configure phpBB
|
||||
|
||||
# Start MySQL
|
||||
echo "[Codespaces] Start MySQL"
|
||||
sudo service mysql start
|
||||
|
||||
# Start Apache
|
||||
echo "[Codespaces] Start Apache"
|
||||
sudo service apache2 start
|
||||
|
||||
# Add SSH key
|
||||
echo "[Codespaces] Add SSH key"
|
||||
echo "$SSH_KEY" > /home/vscode/.ssh/id_rsa && chmod 600 /home/vscode/.ssh/id_rsa
|
||||
|
||||
# Create a MySQL user to use
|
||||
echo "[Codespaces] Create MySQL user"
|
||||
sudo mysql -u root<<EOFMYSQL
|
||||
CREATE USER 'phpbb'@'localhost' IDENTIFIED BY 'phpbb';
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'phpbb'@'localhost' WITH GRANT OPTION;
|
||||
CREATE DATABASE IF NOT EXISTS phpbb;
|
||||
EOFMYSQL
|
||||
|
||||
# Download dependencies
|
||||
echo "[Codespaces] Install Composer dependencies"
|
||||
composer install --no-interaction
|
||||
|
||||
# Symlink the webroot so it can be viewed
|
||||
echo "[Codespaces] Create Symlink of webroot"
|
||||
sudo rm -rf /var/www/html
|
||||
sudo ln -s /workspaces/phpbb/phpBB /var/www/html
|
||||
|
||||
# Copy phpBB config
|
||||
echo "[Codespaces] Copy phpBB configuration"
|
||||
cp /workspaces/phpbb/.devcontainer/resources/phpbb-config.yml /workspaces/phpbb/phpBB/install/install-config.yml
|
||||
|
||||
# Install phpBB
|
||||
echo "[Codespaces] Run phpBB CLI installation"
|
||||
cd /workspaces/phpbb/phpBB && composer install --no-interaction
|
||||
sudo php /workspaces/phpbb/phpBB/install/phpbbcli.php install /workspaces/phpbb/phpBB/install/install-config.yml
|
||||
rm -rf /workspaces/phpbb/phpBB/install
|
||||
|
||||
# Finished
|
||||
echo "[Codespaces] phpBB installation completed"
|
10
.devcontainer/resources/xdebug.ini
Normal file
10
.devcontainer/resources/xdebug.ini
Normal file
@@ -0,0 +1,10 @@
|
||||
zend_extension=xdebug.so
|
||||
|
||||
[xdebug]
|
||||
xdebug.mode=develop,debug
|
||||
xdebug.discover_client_host=1
|
||||
xdebug.client_port=9003
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.log='/var/log/xdebug/xdebug.log'
|
||||
xdebug.connect_timeout_ms=2000
|
||||
xdebug.idekey=VSCODE
|
Reference in New Issue
Block a user