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

Design #1

Open
izumin5210 opened this issue Oct 9, 2019 · 2 comments
Open

Design #1

izumin5210 opened this issue Oct 9, 2019 · 2 comments

Comments

@izumin5210
Copy link
Member

No description provided.

@izumin5210
Copy link
Member Author

Configuration

# glx.services.yaml

<: &api-gateway-local
  name: api-gateway
  hostname: api.example.local
  path: github.com/example/api-gateway
  port_env:
  - APP_PORT=80
  processes:
  - name: server
    run: ["go", "run", "./cmd/server"]

<: &shopping-cart-docker
  name: shopping-cart
  hostname: shopping-cart.example.local
  path: github.com/example/shopping-cart
  port_envs:
  - PORT=80
  on_start:
  - copy_ssh
  - run: ["bundle", "-j4"]
  processes:
  - name: server
    run: ["bin/rails", "s"]
  - name: sidekiq
    run: ["bundle", "exec", "sidekiq", "-C", "config/sidekiq.yml", "--verbose"]
    adhoc: true
  docker:
    build:
      target: runnable
    volumes:
    - .:/app
    - bundle:/usr/local/bundle
    - tmp:/app/tmp
    - log:/app/log

<: &accounts-k8s
  name: accounts
  hostname: accounts.example.local
  path: github.com/example/accounts
  kubernetes:
    context:   k8s.example.com
    namespace: accounts
    labels:
      role: api
    ports:
      80: 8080
# glx.yaml

root: /Users/izumin/src

projects:
- name: shopping
  apps:
  - *api-gateway-local
  - *shopping-cart-docker
  - *accounts-k8s

@izumin5210
Copy link
Member Author

izumin5210 commented Oct 9, 2019

Commands

$ glx up shopping  # start apps

$ cd ~/src/github.com/example/shopping-card
$ glx rails c  # execute `rails c` inside shopping-card container
$ glx restart  # restart server and sidekiq worker

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

1 participant