Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable codespace port forwarding #38

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"name": "${localWorkspaceFolderBasename} - Dev Container",
"dockerComposeFile": "../compose.yml",
"service": "php",
"workspaceFolder": "/workspace",
"postStartCommand": "install-app",
"forwardPorts": [8888],
"containerEnv": { "CODESPACE_NAME": "${localEnv:CODESPACE_NAME}" },
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/devcontainers/features/node:1": {}
Expand Down
8 changes: 8 additions & 0 deletions .ops/settings.local.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

$config_directories['staging'] = '/workspace/profiles/decanter_profile/config/';
$config['system.core']['config_sync_clear_staging'] = 0;

if (!empty($_ENV['CODESPACE_NAME'])) {
$base_url = 'https://' . $_ENV['CODESPACE_NAME'] . '-8888.app.github.dev';
}
1 change: 1 addition & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
interval: 10s
volumes:
- ./:/workspace
- ./.ops/settings.local.php:/var/www/html/settings.local.php

backstop:
image: backstopjs/backstopjs
Expand Down
9 changes: 2 additions & 7 deletions containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,10 @@ RUN git clone https://github.com/backdrop-contrib/bee.git /bee \
devel \
&& chown -R www-data:www-data /var/www/html

RUN echo \
"<?php "\
"\$config_directories['staging'] = '/workspace/profiles/decanter_profile/config/';"\
"\$config['system.core']['config_sync_clear_staging'] = 0;"\
> /var/www/html/settings.local.php

# Add the theme code to the bd install.
COPY ./ /workspace

RUN cd /var/www/html \
&& ln -s /workspace themes/stanford_decanter \
&& ln -s /workspace/profiles profiles;
&& ln -s /workspace/profiles profiles \
&& ln -s /workspace/.ops/settings.local.php settings.local.php;
Loading