-
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add dockerfile and docker-compose for development purpose
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 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,38 @@ | ||
# general | ||
.env | ||
.DS_Store | ||
.idea | ||
.phplint-cache | ||
dump.html | ||
.vscode | ||
.github | ||
.editorconfig | ||
.dockerignore | ||
Dockerfile | ||
docker-compose.yml | ||
/.git | ||
|
||
# phive | ||
/tools | ||
.phive | ||
|
||
# composer | ||
/vendor | ||
composer.lock | ||
|
||
# docs | ||
/build | ||
.phpdoc | ||
/docs | ||
/guide | ||
|
||
# php-cs-fixer | ||
.php_cs.cache | ||
.php_cs | ||
.php-cs-fixer.php | ||
.php-cs-fixer.cache | ||
|
||
# phpunit | ||
phpunit.log | ||
/.phpunit* | ||
/coverage |
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 @@ | ||
FROM php:8.1-cli-alpine | ||
|
||
RUN apk add --update linux-headers \ | ||
&& apk --no-cache add pcre ${PHPIZE_DEPS} \ | ||
&& pecl install xdebug-3.3.2 \ | ||
&& docker-php-ext-enable xdebug \ | ||
&& apk del pcre ${PHPIZE_DEPS} | ||
|
||
# Use the default production configuration | ||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
|
||
ENV BOTDIR="/root/discord-php" | ||
ENV BOTSCRIPT="./bot.php" | ||
LABEL version="10" | ||
WORKDIR ${BOTDIR} | ||
COPY . ${BOTDIR} | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
RUN composer install --no-cache --no-interaction | ||
|
||
CMD php ${BOTSCRIPT} |
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 @@ | ||
services: | ||
bot: | ||
build: . | ||
volumes: | ||
- .:/root/discord-php | ||
volumes: | ||
bot: | ||
driver: local |