docker files
This commit is contained in:
parent
fcee973a7a
commit
d94a244bc4
52
parser/.dockerignore
Normal file
52
parser/.dockerignore
Normal file
@ -0,0 +1,52 @@
|
||||
# Ignore common Python-related files and directories
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
|
||||
# Ignore development and version control files
|
||||
*.log
|
||||
*.swp
|
||||
.git
|
||||
.vscode
|
||||
.idea
|
||||
__init__.py
|
||||
|
||||
# Ignore virtual environment and dependencies
|
||||
venv/
|
||||
env/
|
||||
*.egg-info/
|
||||
*.egg
|
||||
*.log
|
||||
|
||||
# Ignore other temporary and build files
|
||||
*.bak
|
||||
*.bak1
|
||||
*.bak2
|
||||
*.swp
|
||||
*.swo
|
||||
*.swn
|
||||
*.un~
|
||||
*.swm
|
||||
*.swl
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.bak
|
||||
*.bak1
|
||||
*.bak2
|
||||
*.orig
|
||||
*.rej
|
||||
*.log
|
||||
*.backup
|
||||
*.tmp
|
||||
*.tmp.*
|
||||
*.diff
|
||||
*.cache
|
||||
*.css.map
|
||||
*.css.map.*
|
||||
|
||||
# Ignore any specific files or directories your project generates
|
||||
# Add lines for any other project-specific files or directories to ignore
|
||||
.env
|
||||
.env*
|
||||
*.env
|
12
parser/Dockerfile
Normal file
12
parser/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM python:3.8-slim-buster
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["/app/wrapper.sh"]
|
21
parser/docker-compose.yaml
Normal file
21
parser/docker-compose.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
version: '2.1'
|
||||
services:
|
||||
agata:
|
||||
container_name: agata
|
||||
image: agata
|
||||
build: .
|
||||
network_mode: host
|
||||
environment:
|
||||
APP_PORT: ${APP_PORT}
|
||||
|
||||
MONGO_USER: ${MONGO_USER}
|
||||
MONGO_PASS: ${MONGO_PASS}
|
||||
MONGO_HOST: ${MONGO_HOST}
|
||||
MONGO_PORT: ${MONGO_PORT}
|
||||
MONGO_DB: ${MONGO_DB}
|
||||
MONGO_COLLECTION: ${MONGO_COLLECTION}
|
||||
|
||||
STARS_MIN: ${STARS_MIN}
|
||||
STARS_MAX: ${STARS_MAX}
|
||||
|
||||
GITHUB_TOKEN: ${GITHUB_TOKEN}
|
16
parser/requirements.txt
Normal file
16
parser/requirements.txt
Normal file
@ -0,0 +1,16 @@
|
||||
blinker==1.6.2
|
||||
certifi==2023.7.22
|
||||
charset-normalizer==3.2.0
|
||||
click==8.1.7
|
||||
dnspython==2.4.2
|
||||
flask==2.3.3
|
||||
idna==3.4
|
||||
importlib-metadata==6.8.0
|
||||
itsdangerous==2.1.2
|
||||
Jinja2==3.1.2
|
||||
MarkupSafe==2.1.3
|
||||
pymongo==4.5.0
|
||||
requests==2.31.0
|
||||
urllib3==2.0.4
|
||||
werkzeug==2.3.7
|
||||
zipp==3.16.2
|
5
parser/run.sh
Executable file
5
parser/run.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Simple runner
|
||||
|
||||
source venv/bin/activate
|
||||
python app.py
|
28
parser/wrapper.sh
Executable file
28
parser/wrapper.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Simple wrapper for executing behave within Docker.
|
||||
#
|
||||
# ENVIRONMENT VARIABLES:
|
||||
#
|
||||
# - REQUIREMENTS_PATH: requirements fullpath;
|
||||
# default = "requirements.txt"
|
||||
#
|
||||
|
||||
|
||||
#
|
||||
# install Python packages for testing purpose, if any.
|
||||
#
|
||||
|
||||
if [ -z "$REQUIREMENTS_PATH" ]; then
|
||||
REQUIREMENTS_PATH=requirements.txt
|
||||
fi
|
||||
|
||||
if [ -f "$REQUIREMENTS_PATH" ]; then
|
||||
pip3 install --no-cache-dir -r $REQUIREMENTS_PATH
|
||||
fi
|
||||
|
||||
#
|
||||
# execute behave
|
||||
#
|
||||
|
||||
exec python app.py
|
Loading…
x
Reference in New Issue
Block a user