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

Docker compose #1

Closed
Anulo2 opened this issue Feb 15, 2023 · 3 comments
Closed

Docker compose #1

Anulo2 opened this issue Feb 15, 2023 · 3 comments

Comments

@Anulo2
Copy link
Contributor

Anulo2 commented Feb 15, 2023

Hey there, this project looks great, i've been looking for a gitlab_bot (Integram) alternative for a long time and I've finally found this. It would be great to have also an example of docker compose to setup everything withous using aws, I'm working on a possibile docker compose on my own and if it works well enough I will try and publish it somewhere but it would be great to have an official example. Thanks for all the great work!

@Anulo2
Copy link
Contributor Author

Anulo2 commented Feb 16, 2023

I had to add some code to do the db migrations like this to make everything work:

image

the docker compose i've come up with looks something like this:

version: '3'

services:
  notifine-bot:
    container_name: '${COMPOSE_PROJECT_NAME}-notifine-bot'
    build: .
    restart: unless-stopped
    networks:
      - telegram_bots
    environment:
      - GITLAB_TELOXIDE_TOKEN=${GITLAB_TELOXIDE_TOKEN}
      - DATABASE_URL=postgresql://notifine:${DATABASE_PASSWORD}@notifine-db
      - WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL}
      - RUST_BACKTRACE=1
      - TELEGRAM_ADMIN_CHAT_ID=${TELEGRAM_ADMIN_CHAT_ID}

    depends_on:
      - notifine-db
    expose:
      - 8080

  notifine-db:
    container_name: '${COMPOSE_PROJECT_NAME}-notifine-db'
    image: postgres:11
    restart: unless-stopped
    networks:
      - telegram_bots
    volumes:
      - ./data/db:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=${DATABASE_PASSWORD}
      - POSTGRES_USER=notifine
      - PUID=1000
      - GUID=1000
    expose:
      - 5432

networks:
  telegram_bots:
    name: telegram_bots

if you want I cand do a pr :D

@mhkafadar
Copy link
Owner

Hey @Anulo2! Thank you for your suggestion. Yes, please create a PR. Docker-compose looks great. About DB migrations lines, please also create another PR.

I appreciate your interest. I hope this project will be an excellent alternative to Integram telegram bot.

This was referenced Feb 18, 2023
@mhkafadar
Copy link
Owner

Both of the PRs merged, Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants