Skip to content

Latest commit

 

History

History
137 lines (90 loc) · 4.24 KB

File metadata and controls

137 lines (90 loc) · 4.24 KB

Woo Platform

Step 1: Clone the repository

Clone the repository to your local machine:

git clone [email protected]:minvws/nl-rdo-woo-web-private.git

Step 2: Install dependencies

Install the dependencies for the project.

Optionally, but recommended, set a CR_PAT env variable:

This project currently needs to access private Composer and NPM packages hosted on Github. When you try to setup the project, it will prompt you for the Github Access Token, if the CR_PAT env variable is not set.

Instead of it prompting you everytime you "reset" the project you can instead set the CR_PAT env variable so it will automatically use that instead.

The token can be created at https://github.com/settings/tokens. It will at least need the following scopes:

  • repo
  • read:packages

You can add more scopes, but the list contains the absolute minimal scopes needed.

Then depending on what shell you are using, you need to set your variable in a different file. You can find out which file by running the following command in your terminal:

echo $SHELL

This will output something like /bin/bash or /bin/zsh in most cases. For bash it's useally ~/.bash_profile (or ~/.bashrc) and for zsh it is going to be ~/.zshrc (the default for MacOS). If the file does not exist you can create it yourself.

Open the file and add the following line:

export CR_PAT="<replace this with your token>"

Instead of manually opening the file and adding the line you can run one of the below commands instead. It will append the line to the file for you:

# For BASH
echo "export CR_PAT='<replace this with your token>'" >> ~/.bash_profile

# For ZSH
echo "export CR_PAT='<replace this with your token>'" >> ~/.zshrc

Step 3: Setup and start docker containers

Start the docker containers we need to run (app, elasticsearch, tika, postgres, rabbitmq):

task up

You can replace up with stop, down and restart.

Note: The Docker containers in this repository are for development purposes only and they are not meant for production use

To administer your elasticsearch instance, you can use https://app.elasticvue.com To administer your rabbitmq instance, you can use https://localhost:15672 (guest/guest)

Step 3: Setup initial user

To set up an initial user, you can use one of the following methods:

a. Using Task

Run this command:

task app:user:create -- "[email protected]" "full name" --super-admin

b. Using the shell

Run this command to shell into a container: task shell

And run the command to add an user:

bin/console woopie:user:create "[email protected]" "full name" --super-admin

Both methods will generate a password and a 2FA token with which you can log into the website.

Step 4: Browse to the site

When this is all done, you can goto the website at http://localhost:8000/balie/login. You can log in with your generated credentials.

See usage for more information on how to use the application.

Misc

Developing frontend

When developing frontend code (either CSS or JS), you can run the following command to watch for changes:

docker-compose exec app npm run watch

Tasks

There are multiple tasks available. You can display all available tasks with task --list.