Skip to content

Commit 660223f

Browse files
authored
Revert "Modify docker compose configuration for local development (#829)" (#835)
This reverts commit f80053c.
1 parent f80053c commit 660223f

4 files changed

Lines changed: 28 additions & 34 deletions

File tree

README.md

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,23 @@ Antenna uses [Docker](https://docs.docker.com/get-docker/) & [Docker Compose](ht
1616
127.0.0.1 minio
1717
127.0.0.1 django
1818
```
19-
3) The following commands will build all services, run them in the background, and then stream the logs.
20-
1) Standard development: will use a pre-built version of the frontend that will not have hot-reloading enabled, but will make startup time faster when restarting the stack.
21-
```sh
22-
# Build the frontend (only needed the first time starting the stack and after modification to the frontend component)
23-
(cd ui && yarn install && yarn build)
24-
```
25-
```sh
26-
# Start the whole compose stack
27-
docker compose up -d
28-
29-
# To stream the logs
30-
docker compose logs -f django celeryworker ui
31-
# Ctrl+c to close the logs
32-
```
33-
If there's a need to update the frontend while using this override, simply re-build the frontend to load the new changes.
34-
```sh
35-
(cd ui && yarn build)
36-
```
37-
38-
2) With Hot Reload UI: Hot reload is enabled for frontend development, but the primary web interface will be slow to load at startup and later restarts.
39-
```sh
40-
# Run docker compose with the override config
41-
docker compose -f docker-compose.yml -f docker-compose-frontend-dev.override.yml up -d
42-
```
43-
44-
4) Optionally, run additional ML processing services: `processing_services` defines ML backends which wrap detections in our FastAPI response schema. The `example` app demos how to add new pipelines, algorithms, and models. See the detailed instructions in `processing_services/README.md`.
19+
20+
2) The following commands will build all services, run them in the background, and then stream the logs.
21+
22+
```sh
23+
docker compose up -d
24+
docker compose logs -f django celeryworker ui
25+
# Ctrl+c to close the logs
26+
```
27+
28+
3) Optionally, run additional ML processing services: `processing_services` defines ML backends which wrap detections in our FastAPI response schema. The `example` app demos how to add new pipelines, algorithms, and models. See the detailed instructions in `processing_services/README.md`.
4529

4630
```
4731
docker compose -f processing_services/example/docker-compose.yml up -d
4832
# Once running, in Antenna register a new processing service called: http://ml_backend_example:2000
4933
```
5034

51-
5) Access the platform the following URLs:
35+
4) Access the platform the following URLs:
5236

5337
- Primary web interface: http://localhost:4000
5438
- API browser: http://localhost:8000/api/v2/
@@ -60,7 +44,7 @@ A default user will be created with the following credentials. Use these to log
6044
- Email: `antenna@insectai.org`
6145
- Password: `localadmin`
6246

63-
6) Stop all services with:
47+
5) Stop all services with:
6448

6549
$ docker compose down
6650

compose/local/ui/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ ENV BROWSER=none
1414
EXPOSE 4000
1515

1616
# Check for changed app dependencies on every start
17-
CMD ["sh", "-c", "yarn preview --debug --host 0.0.0.0 --port 4000"]
17+
CMD ["sh", "-c", "yarn install && yarn start --debug --host 0.0.0.0 --port 4000"]

docker-compose-frontend-dev.override.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ services:
6666
- CHOKIDAR_USEPOLLING=true
6767
- API_PROXY_TARGET=http://django:8000
6868

69+
docs:
70+
image: ami_local_docs
71+
build:
72+
context: .
73+
dockerfile: ./compose/local/docs/Dockerfile
74+
env_file:
75+
- ./.envs/.local/.django
76+
volumes:
77+
- ./docs:/docs:z
78+
- ./config:/app/config:z
79+
- ./ami:/app/ami:z
80+
ports:
81+
- "9025:9000"
82+
command: /start-docs
83+
6984
redis:
7085
image: redis:6
7186
container_name: ami_local_redis

0 commit comments

Comments
 (0)