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

Changing front end microservice #104

Open
umaimehm opened this issue Mar 24, 2019 · 3 comments
Open

Changing front end microservice #104

umaimehm opened this issue Mar 24, 2019 · 3 comments

Comments

@umaimehm
Copy link

How can we change the front end micro service ?
Config/app.yml mentions two instances of frontend :

vendor:
  frontend: https://github.com/rubykube/mikroapp.git

images:
  frontend: rubykube/mikroapp:0.1.5

I understand the GitHub setting but not sure how to go about the docker cloud image.
Do we need to update both variables ?

Thanks.

@ghost
Copy link

ghost commented May 2, 2019

When I first did this, I was having issues with the port on the newly built vendor frontend container not being properly exposed. When I issued docker ps there was no port mapped.

So what I did was update my vendor.yaml.erb template to add expose:

version: '3.6'

services:
  frontend:
    image: node:11
    user: "${UID}:${GID}"
    volumes:
      - ../vendor/frontend:/home/node
    command:
      - sh
      - -c
      - |
        cd /home/node
        yarn
        yarn start
    expose:
      - '3000'
    labels:
      traefik.enable: true
      traefik.frontend.rule: "PathPrefix:/;Host:<%= @config['app']['subdomain'] %>.<%= @config['app']['domain'] %>"
      traefik.port: 3000

Then I followed the instructions as normal.

Fork mikroapp, then link the github fork in the vendor section of app.yml

vendor:
  frontend: https://github.com/umaimehm/mikroapp.git

Following the README

Render compose file

rm compose/vendor.yaml
rake render:config

Review the generated file

Clone the vendors and start

source ./bin/set-env.sh
rake vendor:clone
docker-compose -f compose/vendor.yaml up -d

@umaimehm
Copy link
Author

@atbmatt Thank you for the detailed help. Much appreciated.

@msembinelli
Copy link

No problem @umaimehm . Let me know if you have any troubles!

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

2 participants