Skip to content

Commit

Permalink
Enable codespace port forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
ronan committed Jan 27, 2025
1 parent 26b07a3 commit 19bcc10
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
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;

0 comments on commit 19bcc10

Please sign in to comment.