Skip to content

Commit

Permalink
Merge pull request #2442 from FarmBot/staging
Browse files Browse the repository at this point in the history
v15.8.4
  • Loading branch information
gabrielburnworth authored Sep 27, 2023
2 parents 1bad4df + 4ed9d07 commit a46408f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Hosting your own server requires an understanding of how Ruby on Rails applicati

## Local setup

We recommend all self hosted installations be installed on a fresh Ubuntu server using the instructions provided in [ubuntu_example.sh](https://github.com/FarmBot/Farmbot-Web-App/blob/main/ubuntu_example.sh). These instructions are reguarly checked and updated to ensure they work. **At this time we cannot provide assistance for running the web app in different environments.**
We recommend all self hosted installations be installed on a fresh Ubuntu server using the instructions provided in [ubuntu_example.sh](https://github.com/FarmBot/Farmbot-Web-App/blob/main/ubuntu_example.sh). These instructions are regularly checked and updated to ensure they work. **At this time we cannot provide assistance for running the web app in different environments.**

If you raise an issue indicating that you haven't followed the setup instructions, looked through past issues, or done a cursory internet search for basic help, expect the issue to be closed and we'll point you to the setup instructions. *Again, if you do not have at least intermediate Linux and Ruby experience, please use [my.farm.bot](https://my.farm.bot).* Running a self-hosted server is not easy!

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/tools_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def tools
end

def tool
@tool ||= Tool.join_tool_slot_and_find_by_id(params[:id])
@tool ||= Tool.join_tool_slot_and_find_by_id(params[:id].to_i)
end
end
end
3 changes: 1 addition & 2 deletions frontend/plants/grid/plant_grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ export class PlantGrid extends React.Component<PlantGridProps, PlantGridState> {
grid: this.initGridState,
gridId: uuid(),
status: "clean",
});
this.props.close?.();
}, this.props.close);
});

Buttons = () => {
Expand Down
8 changes: 4 additions & 4 deletions frontend/tools/add_tool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export class RawAddTool extends React.Component<AddToolProps, AddToolState> {

newTool = (name: string) => this.props.dispatch(initSave("Tool", { name }));

back = () => push(Path.tools());

save = () => {
const initTool = init("Tool", {
name: this.state.toolName,
Expand All @@ -63,10 +65,8 @@ export class RawAddTool extends React.Component<AddToolProps, AddToolState> {
const { uuid } = initTool.payload;
this.setState({ uuid });
this.props.dispatch(save(uuid))
.then(() => {
this.setState({ uuid: undefined });
push(Path.tools());
}).catch(() => { });
.then(() => this.setState({ uuid: undefined }, this.back))
.catch(() => { });
};

componentWillUnmount = () =>
Expand Down
3 changes: 2 additions & 1 deletion frontend/ui/filter_search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export class FilterSearch
"filter-search-popover",
Classes.MINIMAL,
this.props.items.length < 4 ? "few-items" : "",
].join(" ")
].join(" "),
modifiers: { offset: { options: { offset: [0, 5] } } },
}}>
<i className="fa fa-caret-down fa-md" />
<Button
Expand Down
21 changes: 10 additions & 11 deletions ubuntu_example.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to install FarmBot Web API on a Fresh Ubuntu 22.10 Machine
# How to install FarmBot Web API on a Fresh Ubuntu 22.04 Machine

# IMPORTANT NOTE: Resources are limited and Farmbot, inc. cannot provide
# longterm support to self-hosted users. If you have never administered a
Expand All @@ -16,19 +16,18 @@
sudo apt remove docker-engine
sudo apt remove docker docker.io containerd runc

# Install docker
# Install docker and docker compose
sudo apt update
sudo apt install ca-certificates curl gnupg lsb-release -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
sudo docker run hello-world # Should run!
# Install docker-compose
sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo curl -SL "https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/lib/docker/cli-plugins/docker-compose
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
sudo docker compose version # test installation
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
# Verify installation
sudo docker run hello-world
sudo docker compose version

# Install FarmBot Web App
# ⚠ SKIP THIS STEP IF UPGRADING!
Expand Down

0 comments on commit a46408f

Please sign in to comment.