CAFT runs in Docker native. To get a local development environment set-up you will need to:
# create local docker images (the ones on docker hub are out of date)
./docker-build
docker-compose run app yarn install --check-files
docker-compose run app rake db:reset
In order to set up the project on your windows machine, you will need WSL installed. Download it from Apps, or download it in the command line:
$ wsl -install d ubuntu
Go through the installation steps and open Ubuntu. In the Ubuntu command line:
# Create a folder called 'code' where you will keep your projects
$ mkdir code
You then need to set up SSH so that you can fetch the CAFT project from Github:
#Create a .ssh folder in your home directory for your SSH key
$ mkdir ~/.ssh
Follow the instructions to create an SSH key.
Follow the instructions to add the SSH key you just created to your GitHub account.
Go to the main CAFT page on GitHub.
Click on the green 'Code' dropdown button, click on the SSH section and copy the link.
In your Ubuntu terminal:
$ cd ~/code
$ git clone link_you_just_copied
Follow through the cloning process. This should create a folder called 'your-caft-visit' with a copy of the project from Github.
Go to Visual Studio Code (download from Apps if you don't have it) and add the 'Remote - WSL' extension.
Sync your Docker Setup with Ubuntu:
Docker preferences > Resources > WSL Integration > Enable integration with additional distros > Select 'Ubuntu' > Re-start Docker.
In your Ubuntu terminal, go to the project folder:
$ cd your-caft-visit
Then, to get the website running locally:
$ docker-compose up
You can see this in your browser: localhost:3000/admins/sign_in
To work on the code, open up a new Ubuntu terminal (shift click) and run:
$ code .
This will open it up in Visual Studio Code. You will need to do this every time you want to work on the code. From here, you can make changes and see them locally in your browser.
rspec
./run_cypress_specs.sh
Any cypress valid arguments can be passed to this script.
Content type
Image
Digest
Size
1.1 GB
Last updated
over 4 years ago
docker pull createkio/your-caft-visit:test