Skip to content

Commit

Permalink
Update Makefile and docker compose to allow for making docker builds …
Browse files Browse the repository at this point in the history
…and running with compose. Update README to reflect this
  • Loading branch information
Karim Tabet committed Nov 9, 2023
1 parent 2f9c972 commit 188ecce
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ server_api:
test-locally:
$(MAKE) -C web_ui test-locally
$(MAKE) -C server test-locally

build-docker:
docker build --tag sidekick-server server/
docker build --tag sidekick-web-ui web_ui/
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [Running Sidekick](#running-sidekick)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Quickstart](#quickstart)
- [Configuration](#configuration)
- [About](#about)
- [License](#license)
Expand Down Expand Up @@ -216,6 +217,14 @@ Go here: [Release notes](docs/release_notes.md)

## Installation

### Quickstart
To get the web-ui and server running as quickly as possible, you can build the Docker images and run them using docker-compose.

Build the Docker images: `make build-docker`

Update the JWT_SECRET_KEY, OPENAI_KEY and SQLALCHEMY_DATABASE_URI environment variables in docker-compose.yaml and the run: `docker-compose up -d`


See the [Local installation guide](docs/local-installation.md) for how to get this up and running.

## Configuration
Expand Down
14 changes: 8 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@ version: '3'

services:
sidekick-web-ui:
image: sidekick/web-ui:latest
image: sidekick-web-ui:latest
ports:
- "127.0.0.1:8081:8081"
- "8081:8081"
environment:
- REACT_APP_SERVER_URL=
- REACT_APP_SERVER_URL=http://127.0.0.1:8000
restart: always
depends_on:
- sidekick-server

sidekick-server:
image: sidekick/server:latest
image: sidekick-server:latest
ports:
- "5003:5003"
- "127.0.0.1:8000:80"
environment:
- OPENAI_API_KEY=
- JWT_SECRET=
- JWT_SECRET_KEY=
- SQLALCHEMY_DATABASE_URI=
restart: always
4 changes: 0 additions & 4 deletions server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ run-dev-locally: init
run-prod-locally: init
pipenv run gunicorn -w 4 -b 0.0.0.0:5003 app:app

run-container:
docker run -d -p 5004:5004 --name sidekick-server app \
docker ps

stop-container:
docker stop sidekick-server; \
docker ps
Expand Down

0 comments on commit 188ecce

Please sign in to comment.