-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
172 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM php:8.2-cli-alpine | ||
|
||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | ||
RUN install-php-extensions zlib bcmath | ||
|
||
COPY builds/dime /docker/dime | ||
|
||
ENTRYPOINT ["/docker/dime"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/sh | ||
|
||
if ! command -v docker >/dev/null 2>&1; then | ||
echo | ||
echo "Please check that Docker is correctly installed https://www.docker.com" | ||
echo | ||
exit 1 | ||
fi | ||
|
||
if [[ "$1" == "delete" ]]; then | ||
docker rmi -f ghcr.io/osteel/dime | ||
rm -- "$0" | ||
exit 0 | ||
fi | ||
|
||
if ! [ -f "~/.dime/database.sqlite" ]; then | ||
mkdir -p ~/.dime && touch ~/.dime/database.sqlite | ||
fi | ||
|
||
command="docker run -it --rm -v ~/.dime/database.sqlite:/root/.dime/database.sqlite" | ||
|
||
if [[ "$1" == "process" && -n "$2" && -f "$2" ]]; then | ||
filename=$(basename "$2") | ||
path=$(cd $(dirname $2); pwd)/$filename | ||
command+=" -v $path:/tmp/$filename ghcr.io/osteel/dime:latest process /tmp/$filename" | ||
else | ||
command+=" ghcr.io/osteel/dime:latest ${@:1}" | ||
fi | ||
|
||
eval "$command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
* text=auto eol=lf | ||
|
||
/.docker export-ignore | ||
/.github export-ignore | ||
/app export-ignore | ||
/bootstrap export-ignore | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace App\Commands; | ||
|
||
use LaravelZero\Framework\Commands\Command; | ||
|
||
/** @codeCoverageIgnore */ | ||
class Delete extends Command | ||
{ | ||
/** | ||
* The signature of the command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'delete'; | ||
|
||
/** | ||
* The description of the command. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Delete Dime'; | ||
|
||
/** Execute the console command. */ | ||
public function handle(): int | ||
{ | ||
return self::SUCCESS; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace App\Commands; | ||
|
||
final class Helpers | ||
{ | ||
public static function installedViaComposer(): bool | ||
{ | ||
return str_contains(__DIR__, '.composer/vendor'); | ||
} | ||
|
||
public static function installedViaDocker(): bool | ||
{ | ||
return str_contains(__DIR__, '/docker'); | ||
} | ||
|
||
public static function installedViaPhar(): bool | ||
{ | ||
return ! self::installedViaComposer() && ! self::installedViaDocker(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters