-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
9 changed files
with
69 additions
and
7 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 |
---|---|---|
@@ -1,5 +1,15 @@ | ||
APP_URL= | ||
APP_URL=http://nginx | ||
|
||
DB_HOST=database | ||
DB_DATABASE=php-telegram-bot | ||
DB_USERNAME=php-telegram-bot | ||
DB_PASSWORD=secret | ||
|
||
# Token and Username from @BotFather | ||
TELEGRAM_BOT_TOKEN= | ||
TELEGRAM_BOT_USERNAME= | ||
TELEGRAM_BOT_API_SERVER= | ||
|
||
# Optionally for testing with custom Bot API server | ||
TELEGRAM_API_ID= | ||
TELEGRAM_API_HASH= | ||
TELEGRAM_BOT_API_SERVER=http://api-server:8081 |
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 @@ | ||
version: '3' | ||
services: | ||
php: | ||
build: docker/php | ||
volumes: | ||
- ./:/app | ||
|
||
nginx: | ||
image: nginx | ||
volumes: | ||
- ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf | ||
- ./:/app | ||
|
||
database: | ||
image: mariadb | ||
volumes: | ||
- ./packages/php-telegram-bot/structure.sql:/docker-entrypoint-initdb.d/structure.sql | ||
environment: | ||
MYSQL_ALLOW_EMPTY_PASSWORD: yes | ||
MYSQL_DATABASE: $DB_DATABASE | ||
MYSQL_USER: $DB_USERNAME | ||
MYSQL_PASSWORD: $DB_PASSWORD | ||
|
||
api-server: | ||
image: tdlight/tdlightbotapi | ||
environment: | ||
TELEGRAM_API_ID: $TELEGRAM_API_ID | ||
TELEGRAM_API_HASH: $TELEGRAM_API_HASH | ||
TELEGRAM_LOCAL: yes |
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,12 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
root /app; | ||
|
||
location ~\.php$ { | ||
try_files $uri =404; | ||
fastcgi_pass php:9000; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
} | ||
} |
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,11 @@ | ||
FROM php:8.1-fpm | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ | ||
|
||
RUN set -eux; \ | ||
apt-get update; \ | ||
apt-get install -y git; \ | ||
install-php-extensions pdo_mysql zip | ||
|
||
WORKDIR /app |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
require '../bootstrap.php'; | ||
require __DIR__ . '/../bootstrap.php'; | ||
|
||
$telegram = createTelegram(); | ||
|
||
|