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

What's happening with the Docker stuff #801

Open
Leopere opened this issue May 5, 2024 · 1 comment
Open

What's happening with the Docker stuff #801

Leopere opened this issue May 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Leopere
Copy link

Leopere commented May 5, 2024

Describe the bug
A bit of confusion with the Docker workflow why is it necessary to establish the working directory in the compose and why establish the shell environment in the compose and why is there a /workspace also. It seems all of this stuff should be done within the Dockerfile where ever that is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'docker-installation.md'
  2. Follow the instructions and have success with just the docker-compose.yml but only if ran next to the init.sh for some reason. https://raw.githubusercontent.com/frappe/lms/develop/docker/init.sh
  3. Wonder why this isn't repeatable in Docker Swarm
  4. See error of zero console output in the Docker log when ported to Swarm.

Expected behavior
Just the same behavior as in Docker Swarm but in Swarm and behind Traefik reverse proxy

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • OS: ubuntu 22.04 LTS Latest Docker
  • Version Latest as of writing.
version: "3.7"

networks:
  traefik:
    external: true 
  default:
services:
  frappe:
    image: frappe/bench:latest
    environment:
      SHELL: /bin/bash
    working_dir: /home/frappe
    networks:
      - traefik
      - default
    volumes:
      - /mnt/tank/persist/example.comfrappe/production/data:/workspace
    deploy:
      placement:
        constraints:
          - node.hostname == web
      labels:
        traefik.enable: "true"
        traefik.http.routers.frappe.tls: "true"
        traefik.http.services.production_frappe.loadbalancer.server.port: 8000
        traefik.http.routers.production_frappe.rule: Host(`frappe.example.com`)
        traefik.http.routers.production_frappe.entrypoints: websecure
        traefik.http.routers.production_frappe.tls.certresolver: letsencryptresolver
        traefik.http.routers.production_frappe.service: production_frappe
        traefik.docker.network: traefik
      update_config:
        order: start-first
        failure_action: rollback
        delay: 30s
        parallelism: 1
      restart_policy:
        condition: always

  mariadb:
    image: mariadb:10.6
    environment:
      MYSQL_ROOT_PASSWORD: 123
    command:
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci
      - --skip-character-set-client-handshake
      - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
    networks:
      - default
    volumes:
      - /mnt/tank/persist/example.com/frappe/production/db:/var/lib/mysql
    deploy:
      placement:
        constraints:
          - node.hostname == db
      labels:
        traefik.enable: "false"
      update_config:
        order: stop-first
        failure_action: rollback
        parallelism: 1
      restart_policy:
        condition: always

  redis:
    image: eqalpha/keydb # This is a drop in compatible Redis alternative because redis is turning sour.
    networks:
      - default
    volumes:
      - /mnt/tank/persist/example.com/frappe/production/redis:/var/lib/mysql
    deploy:
      placement:
        constraints:
          - node.hostname == db
      labels:
        traefik.enable: "false"
      update_config:
        order: stop-first
        failure_action: rollback
        delay: 5s
        parallelism: 1
      restart_policy:
        condition: always
@Leopere Leopere added the bug Something isn't working label May 5, 2024
@joaomarcosjova
Copy link

INTERESTING

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants