Skip to content

Commit

Permalink
implement docker connection
Browse files Browse the repository at this point in the history
  • Loading branch information
SirGankalot committed May 16, 2024
1 parent 5277270 commit 62bcb2d
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 462 deletions.
2 changes: 2 additions & 0 deletions checker3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ RUN python3 -m pip install -r requirements.txt

COPY ./src .

EXPOSE 5050/tcp

ENTRYPOINT [ "/home/checker/.local/bin/gunicorn", "-c", "gunicorn.conf.py", "checker:app" ]
65 changes: 36 additions & 29 deletions checker3/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
version: '2.1'

services:
n0t3b00k-checker:
whatsscam-checker:
build: .
# The checker runs a HTTP interfaces, so we need to map port 3031 to the outside (port 8000).
# The checker runs an HTTP interface, so we need to map port 5008 to the outside (port 8000).
ports:
- 5008:8000
environment:
- MONGO_ENABLED=1
- MONGO_HOST=n0t3b00k-mongo
- MONGO_HOST=whatsscam-mongo
- MONGO_PORT=27017
- MONGO_USER=n0t3b00k
- MONGO_PASSWORD=n0t3b00k
mem_limit: 1G
memswap_limit: 2G
ulimits:
core:
soft: 0
hard: 0
nproc:
soft: 4000
hard: 4000
# The python checkerlib requires a mongo db!
n0t3b00k-mongo:
- MONGO_USER=whatsscam
- MONGO_PASSWORD=whatsscam
# mem_limit: 1G
# memswap_limit: 2G
# ulimits:
# core:
# soft: 0
# hard: 0
# nproc:
# soft: 4000
# hard: 4000
networks:
- whatsscam_whatsscam-net

whatsscam-mongo:
image: mongo
#ports:
# - 27017:27017
volumes:
- ./data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: n0t3b00k
MONGO_INITDB_ROOT_PASSWORD: n0t3b00k
mem_limit: 1G
memswap_limit: 2G
ulimits:
core:
soft: 0
hard: 0
nproc:
soft: 4000
hard: 4000
MONGO_INITDB_ROOT_USERNAME: whatsscam
MONGO_INITDB_ROOT_PASSWORD: whatsscam
# mem_limit: 1G
# memswap_limit: 2G
# ulimits:
# core:
# soft: 0
# hard: 0
# nproc:
# soft: 4000
# hard: 4000
networks:
- whatsscam_whatsscam-net

networks:
whatsscam_whatsscam-net:
external: True

Loading

0 comments on commit 62bcb2d

Please sign in to comment.