Git Product home page Git Product logo

Comments (3)

dreikanter avatar dreikanter commented on August 22, 2024

Something like this (need to support bidirectional communication between test and server services):

version: '3.4'

services:
  # Development environment
  app:
    image: ruby:2
    environment:
      - BUNDLE_PATH=/bundle
    command: bash
    working_dir: /app
    volumes:
      - .:/app:cached
      - bundle:/bundle
    tmpfs:
      - /tmp

  # Integration test
  test:
    image: node:16
    working_dir: /app
    volumes:
      - ./test:/app:cached
      - test_node_modules:/node_modules
    depends_on:
      - server
    ports:
      - "31337:31337"
    command: bash -c "yarn && npx @logux/backend-test http://server:3000/logux"

  # Ruby on Rails application for integration testing
  server:
    image: ruby:2
    environment:
      - BUNDLE_PATH=/bundle
    working_dir: /app
    volumes:
      - ./test/app:/app:cached
      - .:/logux-rack:cached
      - server_bundle:/bundle
    ports:
      - "3000:3000"
    command: bash -c "bundle && bundle exec rails db:reset && bundle exec rails server"

volumes:
  bundle:
  server_bundle:
  test_bundle:
  test_node_modules:

from logux-rack.

zumkorn avatar zumkorn commented on August 22, 2024

I have tried running the tests in different containers.
They crash on 11 test (Processes subscriptions) when the proxy server has to send a request to Logux Server.

To run the tests through docker in different containers, we need to set Logux Server parameters: host and controlMask.
But they cannot be set through the backend-test.

Two ways:

  1. Change backend-test, add ability to set host and controlMask.
  2. Or run rails-app and backend-test in one container.

@ai, @dreikanter What do you think?

from logux-rack.

dreikanter avatar dreikanter commented on August 22, 2024

@zumkorn I believe option 1 makes more sense, since Docker container suppose to run an individual process.

from logux-rack.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.