-
Notifications
You must be signed in to change notification settings - Fork 3
AWS cloud9 development environment setup guide
This guide is for setting up the crown-marketplace project in an AWS cloud9 environment.
For crown-commercial marketplace you need ruby version 2.5.3.
Run the following commands:
rvm install 2.5.3
rvm --default use 2.5.3
For PostgreSQL use steps 1-3 of the following guide:
https://computingforgeeks.com/install-postgresql-11-on-ubuntu-18-04-ubuntu-16-04/
To install PostGIS, do the following commands:
sudo apt update
Make sure to use your version of PostgreSQL in the command (version 11 in this case).
sudo apt install postgis postgresql-11-postgis-2.5
You now need to create an ubuntu role with superuser privileges.
First enter into the PostgreSQL environment using the following commands:
sudo -i -u postgres
psql
You can then do the following SQL commands to create the new role:
CREATE USER ubuntu;
ALTER USER ubuntu WITH SUPERUSER;
Finally exit back to the main command line (exit
) and run the following command:
sudo apt-get install libpq-dev
To install PhantomJS follow all the steps in this gist:
https://gist.github.com/julionc/7476620
To install Yarn, follow the first two steps in this guide:
https://linuxize.com/post/how-to-install-yarn-on-ubuntu-18-04/
You can now git clone the project into your environment using:
git clone https://github.com/Crown-Commercial-Service/crown-marketplace.git
You should have a Cognito account so you can login but to do so you need to make sure you add the “.env.local” file to your project directory.
To initialise the project do the following commands:
yarn
bundle
Make sure they both execute correctly before continuing.
Before running the project do the following commands to create the database:
rake db:setup
rake db:static
You can now run the project using:
rails s
To view the application, click ‘Preview’ (next to run in the menu bar) and select ‘Preview Running Application’ from the drop-down menu.
To enter the facilities-management/beta you must copy the full URL into your browser and add /facilities-management/beta to the end.
This should be all you need to do to get started and begin development.
git config --global user.name "YOUR_USERNAME"
git config --global user.email YOUR_EMAIL
git config --global credential.helper store