TripleParity / docks-api

RESTful API Server for Docks
https://tripleparity.github.io/docks-api/stack-api-spec.html
GNU General Public License v3.0
0 stars 0 forks source link

Error on reversing complex stacks #88

Open egeldenhuys opened 5 years ago

egeldenhuys commented 5 years ago

I am not sure if the problem is with docks-api or docker-api-to-compose, but it only appears to be a problem for complex compose files


Original Stack file: dalla-stats on production:

version: '3.2'

services:

  logger:
    image: egeldenhuys/dalla-stats-logger:arm32v7
    restart: always
    networks:
      - dalla_stats_network
    secrets:
      - dalla_logger_config
    deploy:
      placement:
        constraints:
          - node.hostname == sherlock
 ui:
    image: egeldenhuys/dalla-stats-ui:arm32v7
    restart: always
    networks:
      - dalla_stats_network
      - traefik-net
    ports:
      - mode: host
        protocol: tcp
        published: 9090
        target: 80
    deploy:
      placement:
        constraints:
          - node.hostname == sherlock
      labels:
        - "traefik.docker.network=traefik-net"
        - "traefik.enable=false"
        - "traefik.frontend.rule=Host:test.evert.io"
        - "traefik.port=9090"
        - "traefik.protocol=http"
  db:
    image: yobasystems/alpine-mariadb:arm32v7
    restart: always
    environment:
      MYSQL_USER: SNIP
      MYSQL_PASSWORD: SNIP
      MYSQL_DATABASE: SNIP
    volumes:
      - "dalla_stats_data:/var/lib/mysql"
    networks:
      - dalla_stats_network
    deploy:
      placement:
        constraints:
          - node.hostname == sherlock

volumes:
  dalla_stats_data:
    external: true

networks:
  dalla_stats_network:
  traefik-net:
    external: true

secrets:
  dalla_logger_config:
    file: config.local.ini

Docker API Log

Error while fetching volume details: Error: Request failed with status code 404
Error while attempting to decode stack: Error: Request failed with status code 404
(node:28) UnhandledPromiseRejectionWarning: TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at stringify (/app/node_modules/express/lib/response.js:1075:12)
    at ServerResponse.json (/app/node_modules/express/lib/response.js:249:14)
    at ServerResponse.send (/app/node_modules/express/lib/response.js:158:21)
    at router.get (/app/routes/stacksApi.js:179:21)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
(node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 18)