We're looking at migrating our toolchain to using the CDk. We currently use cloudformation files to generate stacks for our various apps.
For a given app, we currently have the following structure:
|- cloudformation/
|- cloudformation.json
|- src/
We want to be able to use the same cloudfromation stack but remove the cloudformation.json file.
Looking at this: https://aws.amazon.com/blogs/developer/migrating-cloudformation-templates-to-the-aws-cloud-development-kit/
It seems that the preferred way to migrate to using the cdk for a given app is to keep the cloudformation file and import it into the cdk. Then any new changes we need to make are done in the cdk stack.
I tried the instructions in the blog post, but when I went to delete the old cloudformation file, it wouldn't work(obviously).
Is there a way to delete the cloudformation file? Or is the expectations for migrating to the cdk that the cloudformation file sticks around?
The suggestion seems to be to abandon your old git project and maintain things in new one. Is that hard for your use case?
Related
I started working on a project the has some API keys that need to be protected. My personal projects are all using React and Node, but this project is built using yarn (which I'm unfamiliar with). I have ran yarn add dotenv already, and I've tried using their documentation to get it up and running. All of the console.log(process.env.***) return undefined.
My method so far has been to add my variables to the .env file found in the root of the project, and add require('dotenv').config() to the project's application.js file to be loaded. I read that Vue.js 3 doesn't require dotenv and instead uses _VUE_APP prepended to the variable name (which I've tried to make sure it doesn't work that way with Vue 2.8. Spoiler, it does not).
Is there a step I'm missing? Should I take a different approach altogether?
Thanks in advance!
Lets suppose you have two environments: development and production.
For having the variables for these environments, create one file for each environment in the root folder (where is the package.json or .gitignore), one file called .env.developmentand the other called .env.development, and then just create the variables there.
For example, let's say we want one environment variable called api-path, so create a variable in each file called VUE_APP_API_PATH (for example in development environment VUE_APP_API_PATH = http://localhost:3000).
Then, you can retrieve these environment values with let API_route = process.env.VUE_APP_ROOT_API in the script you need this value.
More info here: https://cli.vuejs.org/guide/mode-and-env.html#environment-variables
Hope it helps.
on the angulardart official website, I can not find any docs related to production deployment. I prefer command line way, so far I find out I can do webdev build to generate a build/ directory. But there are still some more questions:
I want to clarify what files I should deploy to the production server. I think they should be favicon.ico, index.html, main.dart.js, styles.css 4 files, right?
Why does it generate .build.manifest, .packages, packages/? two files and one directory which contains many directories and files. They are just confusing me. This is for production. Why do I ever want to have those files? Should I write a deploy script to simply auto-remove them?
It seems the generated main.dart.js is a minimized js file. But why are there many useless newlines in it? How to get rid of those useless newlines properly by using angulardart way? I can do that with gulp, but I don't want to use gulp if dart can handle this.
How to minimize html and css files properly by using angulardart way? for example, index.html and styles.css. Again, I can do that with gulp, but I don't want to use gulp if dart can handle this.
Thank you very much for your help.
Here you can find some of official doc :
https://webdev.dartlang.org/angular/guide/deployment
I generated a mean stack template using the mean generator
yo mean
I am trying to create submodules but it always creates the entire app again because there is no .yo.rc.json file in the folder.
yo doctor says everything is ok
Where should this .yo.rc.json be and is there a way to generate one based on the files I have in my app?
Looks like this is a bug in the generator itself. I've tried other generators and they create the .yo-rc.json file. The angular full stack generator provides a similar structure if anyone encounters the same problem.
Consider we have typical Rails project under Git repository. I want to do my personal tweaks for configuration or code base (e.g. to simplify debugging). I don't want to do any extra work when switching, merging or pulling git branches. I don't want to affect other developers either. What approaches do you use (or can suggest) for that?
My approach is following:
create a file (let say personal_initializer.rb) in config/intializers/ directory
in ~/.gitconfig define
[core]
excludesfile = ~/.excludesfile
in ~/.excludesfile add config/intializers/personal_initializer.rb
do all hacks and tweaks in personal_initializer
I would add development.rb file to .gitignore and create a development.example.rb
development.rb would contain all my personal configuration, and wont be pushed to other devs local sources
development.example.rb would contain default configuration, so when a new dev pull the sources he must copy development.example.rb to development.rb and tweak it as he wish
For every project it's like having two parts: the Rails application and then all documents and pictures related to it.
I wonder how you organize them both.
Do you put everything under the same project root folder and apply Git on that folder or don't you protect your documents with Git at all?
Then, what if the docs are too sensitive or only for owners of that project. Then I probably should't have it under the same folder right?
How have you structured both your Rails code and belonging business documents?
Share your solutions!
If you're deploying with capistrano, as a lot of Rails apps are, the standard solution seems to be to keep these sorts of assets within the shared folder, and then get cap to symlink them into the application at the point of deploy.