Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
refactor: docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielmaialva33 committed Aug 22, 2024
1 parent a516abc commit 29fff37
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.env
.cache
log.txt
.DS_Store
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ __pycache__/
unknown_errors.txt
*.env
venv/
.venv/
.venv/
data
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.6
FROM python:3.12

# install ffmpeg
RUN apt-get update \
Expand Down
64 changes: 64 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
services:
bot:
build:
context: .
dockerfile: Dockerfile
container_name: winx
restart: always
env_file:
- .env
environment:
API_ID: ${API_ID}
API_HASH: ${API_HASH}
BOT_TOKEN: ${BOT_TOKEN}
MONGO_DB_URI: ${MONGO_DB_URI}
DURATION_LIMIT: ${DURATION_LIMIT}
LOGGER_ID: ${LOGGER_ID}
OWNER_ID: ${OWNER_ID}
QUEUE_LIMIT: ${QUEUE_LIMIT}
LEAVE_TIME: ${LEAVE_TIME}
SET_CMDS: ${SET_CMDS}
AUTO_LEAVING_ASSISTANT: ${AUTO_LEAVING_ASSISTANT}
SPOTIFY_CLIENT_ID: ${SPOTIFY_CLIENT_ID}
SPOTIFY_CLIENT_SECRET: ${SPOTIFY_CLIENT_SECRET}
PLAYLIST_FETCH_LIMIT: ${PLAYLIST_FETCH_LIMIT}
TG_AUDIO_FILESIZE_LIMIT: ${TG_AUDIO_FILESIZE_LIMIT}
TG_VIDEO_FILESIZE_LIMIT: ${TG_VIDEO_FILESIZE_LIMIT}
PRIVATE_BOT_MODE: ${PRIVATE_BOT_MODE}

OPEN_AI_API_KEY: ${OPEN_AI_API_KEY}
MIDJOURNEY_KEY: ${MIDJOURNEY_KEY}
REPLICATE_API_TOKEN: ${REPLICATE_API_TOKEN}

STRING_SESSION: ${STRING_SESSION}
STRING_SESSION2: ${STRING_SESSION2}
STRING_SESSION3: ${STRING_SESSION3}
STRING_SESSION4: ${STRING_SESSION4}
STRING_SESSION5: ${STRING_SESSION5}
STRING_SESSION6: ${STRING_SESSION6}
STRING_SESSION7: ${STRING_SESSION7}
STRING_SESSION8: ${STRING_SESSION8}
STRING_SESSION9: ${STRING_SESSION9}
STRING_SESSION10: ${STRING_SESSION10}
network_mode: "service:warp"
depends_on:
- warp

warp:
image: caomingjun/warp
restart: unless-stopped
ports:
- '1080:1080'
environment:
- WARP_SLEEP=2
cap_add:
- NET_ADMIN
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
- net.ipv4.conf.all.src_valid_mark=1
volumes:
- ./data:/var/lib/cloudflare-warp

networks:
lavalink-net:
driver: bridge

0 comments on commit 29fff37

Please sign in to comment.