Sign inSign up

amineessadiki/caissemanager-backend:latest

Manifest digest

sha256:14feee2a780bfc51a7c755374d8aeced4e9550accf31e20440d6f685e1547f28

Last pushed

1 day by amineessadiki

Type

Compose

Manifest digest

sha256:14feee2a780bfc51a7c755374d8aeced4e9550accf31e20440d6f685e1547f28

Compose file content

name: caissemanager
services:
  app:
    container_name: cm-api
    depends_on:
      host-dirs-init:
        condition: service_completed_successfully
        required: true
      mongo:
        condition: service_healthy
        required: true
      redis:
        condition: service_started
        required: true
    environment:
      API_KEY: c7a2a4fbb145def05dfa52374c932ce9c66ed6ee095295efe36eee4d4562de81
      APP_CONTAINER_NAME: express-app
      APP_PORT: "8000"
      FLASK_RENDER_URL: http://html-renderer:5000/render
      HOSTNAME: 0.0.0.0
      JWT_SECRET: CaisseManagerSecret
      LICENCE_KEY: null
      MONGO_PASSWORD: securePassword
      MONGO_URI: mongodb://dbAdmin:securePassword@mongo:27017/caissemanager?authSource=admin&replicaSet=rs0
      MONGO_USERNAME: dbAdmin
      NODE_ENV: test
      PORT: "8000"
      PRINT_URL: http://printing-worker:3000
      REDIS_HOST: redis
      REDIS_PORT: "6379"
      SESSION_SECRET: CaisseManagerSecret
      SOCKET_PORT: "8001"
    expose:
      - "8000"
      - "8001"
    extra_hosts:
      - host.docker.internal=host-gateway
    healthcheck:
      test:
        - CMD-SHELL
        - curl -f http://localhost:8000/health || exit 1
      timeout: 10s
      interval: 30s
      retries: 4
      start_period: 40s
    image: amineessadiki/cm-backend-api:20f52e5400aaefaa0b9be849042c6fdb001913cf
    logging:
      driver: json-file
      options:
        max-file: "3"
        max-size: 10m
    networks:
      bridge-network: null
    ports:
      - mode: ingress
        target: 8000
        published: "8000"
        protocol: tcp
      - mode: ingress
        target: 8001
        published: "8001"
        protocol: tcp
    restart: always
    volumes:
      - type: volume
        source: logs_data
        target: /usr/src/app/logs
        volume: {}
      - type: volume
        source: uploads_data
        target: /usr/src/app/uploads
        volume: {}
  backoffice:
    container_name: cm-backoffice
    depends_on:
      app:
        condition: service_started
        required: true
    environment:
      API_KEY: c7a2a4fbb145def05dfa52374c932ce9c66ed6ee095295efe36eee4d4562de81
      API_URL: ${API_URL:-http://localhost:8000/api}
      BACKOFFICE_PORT: "3003"
      SOCKET_URL: ${SOCKET_URL:-http://localhost:8001}
      VITE_CURRENCY: MAD
    image: docker.io/amineessadiki/cm-backoffice:9dd1559
    labels:
      cm.runtime-urls: "true"
    networks:
      bridge-network: null
    ports:
      - mode: ingress
        target: 80
        published: "${BACKOFFICE_PORT:-3003}"
        protocol: tcp
    restart: always
  front:
    container_name: cm-pos-front
    depends_on:
      app:
        condition: service_started
        required: true
    environment:
      API_KEY: c7a2a4fbb145def05dfa52374c932ce9c66ed6ee095295efe36eee4d4562de81
      API_URL: ${API_URL:-http://localhost:8000/api}
      GOOGLE_MAPS_API_KEY: api-key
      POS_PORT: "8080"
      SOCKET_URL: ${SOCKET_URL:-http://localhost:8001}
      VITE_CURRENCY: MAD
    image: docker.io/amineessadiki/cm-pos:1fb0f8f
    labels:
      cm.runtime-urls: "true"
    networks:
      bridge-network: null
    ports:
      - mode: ingress
        target: 80
        published: "8080"
        protocol: tcp
    restart: always
  host-dirs-init:
    command:
      - mkdir
      - -p
      - /host/opt/caissemanager/mongo-data
      - /host/opt/caissemanager/cache
      - /host/opt/caissemanager/uploads
      - /host/opt/caissemanager/logs
    image: busybox:1.37
    network_mode: none
    restart: "no"
    volumes:
      - type: volume
        source: host_root
        target: /host
        volume: {}
  html-renderer:
    container_name: cm-html-renderer
    depends_on:
      host-dirs-init:
        condition: service_completed_successfully
        required: true
    image: amineessadiki/cm-backend-html-renderer:20f52e5400aaefaa0b9be849042c6fdb001913cf
    logging:
      driver: json-file
      options:
        max-file: "3"
        max-size: 10m
    networks:
      bridge-network: null
    ports:
      - mode: ingress
        target: 5000
        published: "5000"
        protocol: tcp
    restart: always
    volumes:
      - type: volume
        source: uploads_data
        target: /app/uploads
        read_only: true
        volume: {}
  log-archiver:
    container_name: cm-log-archiver
    depends_on:
      host-dirs-init:
        condition: service_completed_successfully
        required: true
    environment:
      LOG_RETENTION_DAYS: "30"
    image: amineessadiki/cm-backend-log-archiver:20f52e5400aaefaa0b9be849042c6fdb001913cf
    logging:
      driver: json-file
      options:
        max-file: "3"
        max-size: 10m
    network_mode: none
    restart: always
    volumes:
      - type: volume
        source: logs_data
        target: /logs
        volume: {}
  mongo:
    container_name: cm-mongo
    depends_on:
      host-dirs-init:
        condition: service_completed_successfully
        required: true
    environment:
      API_KEY: c7a2a4fbb145def05dfa52374c932ce9c66ed6ee095295efe36eee4d4562de81
      APP_CONTAINER_NAME: express-app
      APP_PORT: "8000"
      FLASK_RENDER_URL: http://html-renderer:5000/render
      HOSTNAME: 0.0.0.0
      JWT_SECRET: CaisseManagerSecret
      MONGO_PASSWORD: securePassword
      MONGO_URI: mongodb://dbAdmin:securePassword@mongo:27017/caissemanager?authSource=admin&replicaSet=rs0
      MONGO_USERNAME: dbAdmin
      NODE_ENV: test
      PORT: "8000"
      PRINT_URL: http://printing-worker:3000
      REDIS_HOST: redis
      REDIS_PORT: "6379"
      SESSION_SECRET: CaisseManagerSecret
      SOCKET_PORT: "8001"
    healthcheck:
      test:
        - CMD-SHELL
        - mongosh --quiet -u "$$MONGO_USERNAME" -p "$$MONGO_PASSWORD" --authenticationDatabase admin --eval "db.adminCommand('ping')"
      timeout: 10s
      interval: 10s
      retries: 15
      start_period: 40s
    image: amineessadiki/cm-backend-mongo:20f52e5400aaefaa0b9be849042c6fdb001913cf
    logging:
      driver: json-file
      options:
        max-file: "3"
        max-size: 10m
    networks:
      bridge-network: null
    ports:
      - mode: ingress
        target: 27017
        published: "27017"
        protocol: tcp
    restart: always
    ulimits:
      nofile:
        soft: 64000
        hard: 64000
    volumes:
      - type: volume
        source: mongo_data
        target: /data/db
        volume: {}
  printing-worker:
    cap_add:
      - SYS_RAWIO
    container_name: cm-printing-worker
    depends_on:
      app:
        condition: service_started
        required: true
      html-renderer:
        condition: service_started
        required: true
      redis:
        condition: service_started
        required: true
    device_cgroup_rules:
      - c 180:* rmw
    environment:
      CUSTOMER_PRINTER_FALLBACK: "false"
      CUSTOMER_PRINTER_NETWORK_IP: 192.168.1.55
      CUSTOMER_PRINTER_NETWORK_PORT: "9100"
      CUSTOMER_PRINTER_NETWORK_RETRIES: "2"
      CUSTOMER_PRINTER_NETWORK_TIMEOUT: "5000"
      CUSTOMER_PRINTER_PRIMARY: network
      CUSTOMER_PRINTER_USB_AUTODETECT: "false"
      KITCHEN_PRINTER_FALLBACK: "false"
      KITCHEN_PRINTER_NETWORK_IP: 192.168.1.55
      KITCHEN_PRINTER_NETWORK_PORT: "9100"
      KITCHEN_PRINTER_NETWORK_RETRIES: "2"
      KITCHEN_PRINTER_NETWORK_TIMEOUT: "5000"
      KITCHEN_PRINTER_PRIMARY: network
      KITCHEN_PRINTER_USB_AUTODETECT: "false"
      PRINTER_LOG_LEVEL: info
      PRINTER_POOL_TIMEOUT: "120000"
      REDIS_HOST: redis
      REDIS_PORT: "6379"
      RUN_STARTUP_TESTS: "false"
      TEST_PRINTER_IP: 192.168.1.55
      USB_READ_TIMEOUT: "10000"
    expose:
      - "5000"
    healthcheck:
      test:
        - CMD
        - node
        - -e
        - console.log('Worker health check')
      timeout: 10s
      interval: 30s
      retries: 3
      start_period: 40s
    image: amineessadiki/cm-backend-printing-worker:20f52e5400aaefaa0b9be849042c6fdb001913cf
    logging:
      driver: json-file
      options:
        max-file: "3"
        max-size: 10m
    networks:
      bridge-network: null
    restart: always
    volumes:
      - type: volume
        source: persistent-hostPath
        target: /dev/bus/usb
        volume: {}
  redis:
    container_name: cm-redis
    depends_on:
      host-dirs-init:
        condition: service_completed_successfully
        required: true
    image: redis:6-alpine
    logging:
      driver: json-file
      options:
        max-file: "3"
        max-size: 10m
    networks:
      bridge-network: null
    ports:
      - mode: ingress
        target: 6379
        published: "6379"
        protocol: tcp
    restart: always
    volumes:
      - type: volume
        source: redis_data
        target: /data
        volume: {}
networks:
  bridge-network:
    name: bridge-network
    driver: bridge
volumes:
  host_root:
    name: caissemanager_host_root
    driver_opts:
      device: /
      o: bind
      type: none
  logs_data:
    name: caissemanager_logs_data
    driver_opts:
      device: /opt/caissemanager/logs
      o: bind
      type: none
  mongo_data:
    name: caissemanager_mongo_data
    driver_opts:
      device: /opt/caissemanager/mongo-data
      o: bind
      type: none
  persistent-hostPath:
    name: caissemanager_persistent-hostPath
    driver_opts:
      device: /dev/bus/usb
      o: bind
      type: none
  redis_data:
    name: caissemanager_redis_data
    driver_opts:
      device: /opt/caissemanager/cache
      o: bind
      type: none
  uploads_data:
    name: caissemanager_uploads_data
    driver_opts:
      device: /opt/caissemanager/uploads
      o: bind
      type: none
x-common:
  networks:
    - bridge-network
x-logging:
  driver: json-file
  options:
    max-file: "3"
    max-size: 10m

Docker commands

docker compose -f oci://amineessadiki/caissemanager-backend:latest up

Use the above command to pull and run the Compose file. Learn more⁠.

Images used

Image + 1 more

Busybox base image.


Pulls

1B+

Stars

3522

Last Updated

18 days

Image + 1 more

Redis is the world’s fastest data platform for caching, vector search, and NoSQL databases.


Pulls

1B+

Stars

13624

Last Updated

3 days

Image


Pulls

1.4K

Stars

0

Last Updated

1 day

Image


Pulls

1.2K

Stars

0

Last Updated

1 day

Image


Pulls

1.2K

Stars

0

Last Updated

1 day

Image


Pulls

1.2K

Stars

0

Last Updated

1 day

Image


Pulls

412

Stars

0

Last Updated

1 day

Image


Pulls

342

Stars

0

Last Updated

1 day

Image


Pulls

181

Stars

0

Last Updated

1 day