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

Self Host Change Default from MySQL to MariaDB #383

Closed
EyeOfEnigma opened this issue Mar 12, 2024 · 5 comments
Closed

Self Host Change Default from MySQL to MariaDB #383

EyeOfEnigma opened this issue Mar 12, 2024 · 5 comments

Comments

@EyeOfEnigma
Copy link

EyeOfEnigma commented Mar 12, 2024

Hello,

First off thank you for building this as its much needed in the space, but it has been a nightmare to self host with no luck so far, I'm hoping somebody can help me out.

I'm very close to getting it working except the database migration is looking for a mysql docker instead of mariadb docker.

I already have a docker instance of maria, redis, mongo, etc running on my unraid server and I want to use those. How can I change the migration docker variable from mysql to maria?

The logs keep saying nc: bad address 'mysql'
(If I install a mysql docker it works, but I'm trying to use maria instead.)

This is my new updated docker compose for unraid using the external service dockers.

The DB_HOST variable is set to the correct maria docker but it appears it is not using that variable for the migration, by default it looks for mysql.

# This is a production version of the Bigcapital docker-compose.yml file.

version: '3.3'

services:
  nginx:
    container_name: bigcapital-nginx-gateway
    build:
      context: /mnt/user/appdata/bigcapital/docker/nginx
      args:
        - SERVER_PROXY_PORT=3000
        - WEB_SSL=false
        - SELF_SIGNED=false
    volumes:
      - ./data/logs/nginx/:/var/log/nginx
      - ./docker/certbot/certs/:/var/certs
    ports:
      - '${PUBLIC_PROXY_PORT:-80}:80'
      - '${PUBLIC_PROXY_SSL_PORT:-443}:443'
    tty: true
    depends_on:
      - server
      - webapp
    deploy:
      restart_policy:
        condition: unless-stopped
    networks:
      - falcon

  webapp:
    container_name: bigcapital-webapp
    image: ghcr.io/bigcapitalhq/webapp:latest
    deploy:
      restart_policy:
        condition: unless-stopped
    networks:
      - falcon

  server:
    container_name: bigcapital-server
    image: ghcr.io/bigcapitalhq/server:latest
    expose:
      - '3000'
    deploy:
      restart_policy:
        condition: unless-stopped
    networks:
      - falcon
    environment:
      # Mail
      - MAIL_HOST=${MAIL_HOST}
      - MAIL_USERNAME=${MAIL_USERNAME}
      - MAIL_PASSWORD=${MAIL_PASSWORD}
      - MAIL_PORT=${MAIL_PORT}
      - MAIL_SECURE=${MAIL_SECURE}
      - MAIL_FROM_NAME=${MAIL_FROM_NAME}
      - MAIL_FROM_ADDRESS=${MAIL_FROM_ADDRESS}

      # Database
      - DB_HOST=${DB_HOST}
      - DB_USER=${DB_USER}
      - DB_PASSWORD=${DB_PASSWORD}
      - DB_CHARSET=${DB_CHARSET}

      # System database
      - SYSTEM_DB_NAME=${SYSTEM_DB_NAME}

      # Tenants databases
      - TENANT_DB_NAME_PERFIX=${TENANT_DB_NAME_PERFIX}

      # Authentication
      - JWT_SECRET=${JWT_SECRET}

      # MongoDB
      - MONGODB_DATABASE_URL=mongodb://192.168.1.26:27017/bigcapital

      # Application
      - BASE_URL=${BASE_URL}

      # Agendash
      - AGENDASH_AUTH_USER=${AGENDASH_AUTH_USER}
      - AGENDASH_AUTH_PASSWORD=${AGENDASH_AUTH_PASSWORD}

      # Sign-up restrictions
      - SIGNUP_DISABLED=${SIGNUP_DISABLED}
      - SIGNUP_ALLOWED_DOMAINS=${SIGNUP_ALLOWED_DOMAINS}
      - SIGNUP_ALLOWED_EMAILS=${SIGNUP_ALLOWED_EMAILS}

      # Gotenberg (Pdf generator)
      - GOTENBERG_URL=${GOTENBERG_URL}
      - GOTENBERG_DOCS_URL=${GOTENBERG_DOCS_URL}

  database_migration:
    container_name: bigcapital-database-migration
    build:
      context: ./
      dockerfile: docker/migration/Dockerfile
    networks:
      - falcon
    environment:
      # Database
      - DB_HOST=${DB_HOST}
      - DB_USER=${DB_USER}
      - DB_PASSWORD=${DB_PASSWORD}
      - DB_CHARSET=${DB_CHARSET}
      - SYSTEM_DB_NAME=${SYSTEM_DB_NAME}
      # Tenants databases
      - TENANT_DB_NAME_PERFIX=${TENANT_DB_NAME_PERFIX}
  
networks:
  falcon:
    name: falcon
    external: true
Copy link

linear bot commented Mar 12, 2024

@EyeOfEnigma
Copy link
Author

EyeOfEnigma commented Mar 12, 2024

BIG-153 Self Host Change Default from MySQL to MariaDB

Won't let me see the info without an account, I don't have or want whatever "linear" is. This information should be more readily available in the docs.

@nomandera
Copy link

@SyberSin did you ever get this working?

@EyeOfEnigma
Copy link
Author

@nomandera No unfortunately not. I deleted it and won't be looking back. Too many days lost. It looks like the devs don't even care, I suspect because they would rather sell you their hosted version which is probably why the container is unnecessarily complicated. It's a shame, thought I found a true competitor to QuickBooks. Reality is they are still the unchallenged king of the hill.

Copy link
Contributor

The application migrated to MariaDB. check itout.

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

3 participants