How does it work?
The AMI is designed in such a way that you only need to deal with one folder: /var/www/webapp
.
That folder will contain all your configuration files and your source code.
This is how the /var/www/webapp/
folder of your AMI should look like when you launch it:
├── conf
│ ├── autorun.sh
│ ├── cron
│ │ ├── d
│ │ ├── daily
│ │ ├── hourly
│ │ ├── monthly
│ │ └── weekly
│ ├── global
│ │ ├── hostname
│ │ └── timezone
│ ├── mail
│ │ ├── msmtprc
│ │ └── notifications
│ ├── netdata
│ │ └── password
│ └── nginx
│ ├── helloworld.crt
│ ├── helloworld.key
│ └── web.conf
└── src
├── Gemfile
├── Gemfile.lock
├── Rakefile
├── app
├── babel.config.js
├── bin
├── config
├── config.ru
├── db
├── lib
├── log
├── node_modules
├── package.json
├── postcss.config.js
├── public
├── storage
├── test
├── tmp
├── vendor
└── yarn.lock
You can check the contents of our Ruby on Rails demo project
Let’s start with the more obvious part, the src
folder. This is the usual Ruby on Rails folder structure.
If you have used Django before, the folder structure should look very familiar.
That said, let’s move on to the conf
folder. That folder contains the configuration files for each service. You’ll be able to edit the behavior of all the services from here, without having to edit anything else. Just apply your changes and restart the services using the usual systemd
commands or the additional CLI tools provided with this AMIs.