Skip to content

Commit e97afe2

Browse files
committed
[FIX]: Changes to the docker configuration
1 parent e938e6e commit e97afe2

5 files changed

Lines changed: 20 additions & 8 deletions

File tree

Makefile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help build up down logs shell exec pull-model test clean
1+
.PHONY: help build up down logs shell exec pull-model test clean fireform
22

33
help:
44
@printf '%s\n' \
@@ -11,6 +11,7 @@ help:
1111
@echo ""
1212
@echo "Fireform Development Commands"
1313
@echo "=============================="
14+
@echo "make fireform - Build and start containers, then open a shell"
1415
@echo "make build - Build Docker images"
1516
@echo "make up - Start all containers"
1617
@echo "make down - Stop all containers"
@@ -19,7 +20,12 @@ help:
1920
@echo "make exec - Execute Python script in container"
2021
@echo "make pull-model - Pull Mistral model into Ollama"
2122
@echo "make test - Run tests"
22-
@echo "make clean - Remove containers, volumes, and images"
23+
@echo "make clean - Remove containers"
24+
@echo "make super-clean - [CAUTION] Use carefully. Cleans up ALL stopped containers, networks, build cache..."
25+
26+
fireform: build up
27+
@echo "Launching interactive shell in the app container..."
28+
docker compose exec app /bin/bash
2329

2430
build:
2531
docker compose build
@@ -53,4 +59,6 @@ test:
5359

5460
clean:
5561
docker compose down -v
56-
docker system prune -f
62+
super-clean:
63+
docker compose down -v
64+
docker system prune

container-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cat << 'EOF'
66
/ __/ / // / / __/ / __/ / /_/ / / / / / / / /
77
/_/ /_//_/ \___/ /_/ \____/_/ /_/ /_/ /_/
88
EOF
9-
echo "Make sure to have docker installed"echo "Make sure to have docker installed"
9+
echo "Make sure to have docker installed"
1010
echo "Building containers..."
1111
echo "============================================"
1212
make build

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
networks:
1010
- fireform-network
1111
healthcheck:
12-
test: ["CMD-SHELL", "ollama list || exit 0"]
12+
test: ["CMD-SHELL", "ollama ps"]
1313
interval: 10s
1414
timeout: 5s
1515
retries: 3
@@ -24,8 +24,7 @@ services:
2424
ollama:
2525
condition: service_healthy
2626
volumes:
27-
- ./src:/app/src
28-
- ./data:/app/data
27+
- .:/app
2928
environment:
3029
- PYTHONUNBUFFERED=1
3130
- PYTHONPATH=/app/src

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
requests
22
pdfrw
33
flask
4-
commonforms
4+
commonforms
5+

setup-dockers-env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
source venv/bin/activate
4+
pip install -r requirements.txt

0 commit comments

Comments
 (0)