-
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
4 changed files
with
40 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 |
---|---|---|
|
@@ -20,7 +20,3 @@ public.pem | |
*.session | ||
parser.json | ||
test_site.py | ||
|
||
### Docker ### | ||
Dockerfile | ||
docker-compose.yml |
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,25 @@ | ||
FROM python:3.12.3-slim | ||
|
||
|
||
RUN apt-get update && apt-get install -y curl | ||
|
||
# Installing Poetry using curl | ||
RUN curl -sSL https://install.python-poetry.org | python3 - | ||
|
||
#Adding Poetry to the PATH | ||
ENV PATH="/root/.local/bin:$PATH" | ||
|
||
|
||
COPY pyproject.toml poetry.lock /app/ | ||
|
||
#We give full access rights to the /app directory. | ||
RUN chmod 777 /app | ||
|
||
WORKDIR /app | ||
|
||
#we install the dependencies specified in py project.tom l, excluding dev dependencies. | ||
RUN poetry install --no-dev | ||
|
||
COPY . /app | ||
|
||
CMD ["poetry", "run", "python", "-u", "pyrogram_parser.py"] |
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,13 @@ | ||
version: '3.7' | ||
|
||
services: | ||
parser: | ||
build: . | ||
volumes: | ||
- .env:/app/.env # Attach the .env file to the container | ||
networks: | ||
- default # Connect the service to the default network | ||
|
||
networks: | ||
default: | ||
driver: bridge |
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