diff --git a/Dockerfile b/Dockerfile index 473e2f5..3874fe3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,12 @@ FROM php:7.4-cli COPY . /app WORKDIR /app -RUN pecl install apcu ev\ - && docker-php-ext-enable apcu \ - && docker-php-ext-enable ev \ +#Remove .git and other dirs and files +RUN rm -rf .git/ .idea/ .DS_Store + +RUN pecl install apcu ev \ + && docker-php-ext-enable apcu ev \ + && echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/php.ini \ && apt-get update && apt-get install git zip vim nano -y \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && composer global require hirak/prestissimo diff --git a/bin/docker-compose-up-link-dir.sh b/bin/docker-compose-up-link-dir.sh new file mode 100755 index 0000000..494b12a --- /dev/null +++ b/bin/docker-compose-up-link-dir.sh @@ -0,0 +1,4 @@ +#!/bin/bash +ROOT=$(dirname $0)"/.." + +docker-compose -f "$ROOT/docker-compose.yml" -f "$ROOT/docker-compose-link-dir.yml" up -d \ No newline at end of file diff --git a/bin/docker-exec.sh b/bin/docker-exec.sh new file mode 100755 index 0000000..fd2552c --- /dev/null +++ b/bin/docker-exec.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it telegram-api-server /bin/bash \ No newline at end of file diff --git a/bin/docker-logs.sh b/bin/docker-logs.sh new file mode 100755 index 0000000..aa53e6f --- /dev/null +++ b/bin/docker-logs.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker logs telegram-api-server --follow \ No newline at end of file diff --git a/docker-compose-link-dir.yml b/docker-compose-link-dir.yml new file mode 100644 index 0000000..116884d --- /dev/null +++ b/docker-compose-link-dir.yml @@ -0,0 +1,5 @@ +version: '3' +services: + telegram-api-server: + volumes: + - ./:/app \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index fa5bc67..57ee458 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: '3' services: telegram-api-server: build: ./