Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local deployment #84 #106

Merged
merged 2 commits into from
Oct 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Docker/irc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ubuntu:latest
RUN apt update -y
RUN apt install -y ircd-irc2

EXPOSE 6667

CMD ["/usr/sbin/ircd", "-t"]
5 changes: 5 additions & 0 deletions Docker/nutrient/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3.4-alpine
ADD . /code
WORKDIR /code
CMD ["python", "run.py"]

18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '2'
services:
irc:
build: ./Docker/irc
ports:
- "6667:6667"

nutrient:
depends_on:
- irc
restart: always
build: ./Docker/nutrient
volumes:
- .:/code
environment:
NB_USER: "nutri"
NB_SERVER: "irc"
NB_CHANNEL: "#nbchannel"
9 changes: 5 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import re
import socket

Expand Down Expand Up @@ -26,12 +27,12 @@ def ping():
# This is a main routine
def main():
global irc, user_queue
botnick = "nutrient-bot"
botnick = os.environ.get("NB_USER", "nutrient-bot")
bufsize = 2048
admin = ["rahuldecoded"]
channel = "#uit-foss"
port = 6667
server = "irc.freenode.net"
channel = os.environ.get("NB_CHANNEL", "#uit-foss")
port = int(os.environ.get("NB_PORT", 6667))
server = os.environ.get("NB_SERVER", "irc.freenode.net")
master = "rahuldecoded"
uname = "Nutrient Bot"
realname = "I'm a Test Bot!"
Expand Down