Skip to content

Commit

Permalink
Merge pull request #351 from AmpersandTarski/fix/350-invalid-command
Browse files Browse the repository at this point in the history
Fix/350 invalid command
  • Loading branch information
FranSlot committed Feb 1, 2024
2 parents 563a335 + c18c24c commit cf082c2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion RAP4/customizations/bootstrap/files/ExecEngineFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@
[ "--name \"{$userName}\"",
"--rm", # deletes the container when it is stopped. Useful to prevent container disk space usage to explode.
"-i",
"-p 8000:80",
"-a stdin", // stdin ensures that the content of the script is available in the container.
"--network proxy", // the reverse proxy Traefik is in the proxy network
"--label traefik.enable=true", // label for Traefik to route trafic
Expand All @@ -413,7 +414,11 @@
$command->execute();

// Add docker container also to rap_db network
$command2 = new Command("docker network connect rap_db {$userName}", null, $ee->getLogger());
$command2 = new Command(
"docker network connect rap_db {$userName}",
[],
$ee->getLogger()
);
$command2->execute();
}

Expand Down
4 changes: 2 additions & 2 deletions RAP4/customizations/extensions/RAP4/src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Command
*
* @var string[]
*/
protected $args;
protected array $args;

/**
* Exit code returned after execution of command
Expand All @@ -39,7 +39,7 @@ class Command
*/
protected $logger = null;

public function __construct(string $cmd, array $args = null, LoggerInterface $logger = null)
public function __construct(string $cmd, array $args = [], LoggerInterface $logger = null)
{
$this->cmd = $cmd;
$this->args = $args;
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
context: RAP4USER

rap4:
image: ampersandtarski/ampersand-rap:latest
image: ampersandtarski/ampersand-rap:dev-latest
container_name: rap4
build:
context: RAP4
Expand All @@ -61,7 +61,7 @@ services:
- AMPERSAND_DBNAME=rap4
- AMPERSAND_SERVER_URL=https://${SERVER_HOST_NAME} # from .env file
- RAP_HOST_NAME=${SERVER_HOST_NAME}
- RAP_STUDENT_PROTO_IMAGE=ampersandtarski/rap4-student-prototype:v1.1.1
- RAP_STUDENT_PROTO_IMAGE=ampersandtarski/rap4-student-prototype:dev-latest
- RAP_STUDENT_PROTO_LOG_CONFIG=logging.yaml
- APACHE_RUN_DIR=/var/www
volumes:
Expand Down

0 comments on commit cf082c2

Please sign in to comment.