Closed sherif84 closed 9 years ago
Ah, yes. I suspect you created your project with the scaffolding tool. When you do this, it creates your config directories, for dev and production. This automatically creates a 'settings.json' file for you to put meteor settings in to. However, iron mup xxx --init also creates a 'settings.json' file.
So mup is reading your current settings.json file as a mup project, simply copy it's contents and delete it. re run the init command, this time you should get a success. now paste in your settings in to the new settings.json file and you are all set :)
EDIT: I just tried this with a fresh iron project and was successful in creating a mup project. For good measure, make sure mup and mupx are both installed globally with npm. Looks like you do, from your error log.
$ sudo npm install -g mup mupx Cheers!
This bit is purely personal preference- I prefer to use the mup tool by itself, not combined with iron. this requires you to cd in to the appropriate config DIR, but I've had greater success with more consistency going this route. Also, someone correct me if i'm wrong, but I think this bypasses the env.sh file that iron creates. My structure is as follows.
config/development/ -settings.json -env.sh
config/production/ -mup.json -settings.json
iron run (local) will automagically run the config/development files. For production, my env variables are stored in the mup.json instead of the env.sh in dev. When i want to deploy, i simply run
$ cd /PATH-TO-APP/config/production && mup setup && mup deploy If i'm simply updating an existing deployment, i replace setup with reconfig
$ cd /PATH-TO-APP/config/production && mup reconfig && mup deploy
Like I mentioned earlier, you can access mup however you wish. This is simply my preference and to my experience, offers the most consistent results.
hi,
I have a problem using mup with iron. Typing iron mup development --init (or any mup command for that matter) gives me the same result/screen as if I was typing iron help, where it list the various iron commands. Any ideas what I am missing?
And if I were to use mup on its own, where should I run it from? From the app folder inside the iron-cli folder structure, or from the
thanks for your help ! Antoine
Sounds like you didn't include mup in your .iron/config.json, so iron doesn't know what packages to use for mup. The OP has his setup in the opening post, it should work for you. Just replace the dev/prod paths with your own. Also make sure mup is installed globally through npm. Cheers!
This is actually the part that confuses me, i did add that part. See my .iron/config.json file below { "engines": { "html": "html", "js": "js", "css": "css" },
"template": { "html": true, "js": true, "css": true },
"route": { "controller": true, "template": true },
"mup": { "version": "mup|mupx", "development": "/config/development", "staging": "/config/staging", "production": "/config/production" } }
Hmm, and you're sure you've installed mup & mupx via npm? Try $ sudo npm install -g mup mupx see if it grabs anything. if so, that's most likely your problem. I prefer mup by itself, without the iron cli. Although if the iron-cli version is your poison, they both need to be installed globally.
I had put in this global install command. just did it again with the same result. I am fine using mup by itself (mup init works for ex) but I am not clear where I should run this with the iron-cli folder structure. If I have a config/production folder, do I need to cd in it and run mup from there?
If you run mup by itself you need to be in the directory of the mup.json that you want to use. Dev/Prod/Staging. You need to cd into it. iron mup, on the other hand, is smart enough to know you're in an iron project. you can run it from the project root, but i believe it's smart enough to be run anywhere in the project. I know you can run iron run from any directory in the project. As long as mup is configured in the config.json, I don't think it's any different. To be sure, run it in the root DIR, where you have app, build, config, etc.
thanks for your help, I am going to try that. Thanks again ! AA
Ok, I got it to work but the env.sh for my given environment got lost in the process. I ended up adding the required environment variables manually in the env.sh used by mup on my server, post deployment, and restarted my app for the variable values to get picked up. Now that the setup is done on all sides, pushing code updates is a pleasure :) I'd like to get it to work via iron-cli though so managing environments gets better so I will monitor this thread and see how it goes.
thanks so much for your help !
Antoine
@sherif84 @dustinws @aarlaud the latest release has fixes for this issue. i'd like to handle env.sh integration at some point in the near future, but for now, initializing with mup should work properly
I'm trying to deploy using mup however following the instruction :+1:
Any Idea ?