- Juan Pablo Orsay (Developer)
- Horacio Miguel Gómez (Developer)
- Ariel Aizemberg (Tutor)
To create a local environment, run:
make setup
After that's done, you'll have all of the required containers correctly setup and NERd available at localhost:8080
.
When you want to do any change there are different procedures for each of the sub-projects.
Any changes done to the app
directory will be automatically synchronized and you should see changes instantly in the back-end.
The UI is a bit trickier due to React not using the build directory when in dev mode (1). So there are two alternatives.
After every change, trigger a build:
yarn build
This will compile de UI, which will update it within the container.
It has the advantage of requiring only a command, but the disadvantage that it has to be run for every change that you want to test.
When you run yarn start
, React will initialize a development server that refreshes after each change. Since the 3000 port will be used by the UI container, you'll have to use the next available port.
There's an .env.development
file with the required variables for the UI to work.
pf-nerd is the default endpoint for deployment, and since it's an SSH alias, you'll need to create it in your ~/.ssh/config
.
An example ~/.ssh/config
fragment (You need to replace <VAR>
):
Host pf-nerd-proxy
Hostname <PROXY_URL>
User <ITBA_USER>
Host pf-nerd
Hostname <MACHINE_IP>
User <MACHINE_USER>
# Uncomment the next line to use a proxy.
# ProxyCommand ssh pf-nerd-proxy nc %h %p
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
To create new Docker images, run:
make build
You'll need to have the required credentials to this repository to upload new images to the GitHub package server. Once you do, run the following command:
make prod-publish-new-version
Once you have the latest images uploaded (or if you are initializing a new server), run:
make prod-setup
Once this command finishes, you'll have the server configured with a full instance of NERd.
If you want to do everything using a single command, run:
make build prod-publish-new-version prod-setup