Skip to content

Commit 5a5e157

Browse files
Adjusted docker commands
1 parent 100bd66 commit 5a5e157

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

Makefile

+12-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ help:
1212
@awk '/^[a-zA-Z_-]+:/{split($$1, target, ":"); print " " target[1] "\t" substr($$0, index($$0,$$2))}' $(MAKEFILE_LIST)
1313

1414
# Backend commands
15-
.PHONY: start-backend test-backend migrate-backend
15+
.PHONY: start-backend test-backend
1616

1717
start-backend: ## Start the backend server with FastAPI and hot reload
1818
cd $(BACKEND_DIR) && ./start.sh
@@ -32,25 +32,30 @@ test-frontend: ## Run frontend tests using npm
3232

3333

3434
# Docker commands
35-
.PHONY: docker-backend-shell docker-frontend-shell build-backend-container build-frontend-container \
36-
up-backend-container up-frontend-container
35+
.PHONY: docker-backend-shell docker-frontend-shell docker-build docker-build-backend \
36+
docker-build-frontend docker-start-backend docker-start-frontend docker-up-test-db \
37+
docker-migrate-db docker-db-schema docker-test-backend docker-test-frontend
38+
3739

3840
docker-backend-shell: ## Access the backend container shell
3941
$(DOCKER_COMPOSE) run --rm backend sh
4042

4143
docker-frontend-shell: ## Access the frontend container shell
4244
$(DOCKER_COMPOSE) run --rm frontend sh
4345

46+
docker-build: ## Build all the services
47+
$(DOCKER_COMPOSE) build --no-cache
48+
4449
docker-build-backend: ## Build the backend container with no cache
45-
docker build backend --no-cache
50+
$(DOCKER_COMPOSE) build backend --no-cache
4651

4752
docker-build-frontend: ## Build the frontend container with no cache
48-
docker build frontend --no-cache
53+
$(DOCKER_COMPOSE) build frontend --no-cache
4954

50-
docker-up-backend: ## Start the backend container
55+
docker-start-backend: ## Start the backend container
5156
$(DOCKER_COMPOSE) up backend
5257

53-
docker-up-frontend: ## Start the frontend container
58+
docker-start-frontend: ## Start the frontend container
5459
$(DOCKER_COMPOSE) up frontend
5560

5661
docker-up-test-db: ## Start the test database container

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Copy the `.env.example` files to `.env`. These values are unlikely to change, so
137137
1. Use Docker to run the database to avoid local installation issues. Build and start the database container:
138138
```bash
139139
docker compose build db
140-
docker compose up db
140+
docker compose up -d db
141141
```
142142
2. Run the following command to apply database migrations:
143143
```bash
@@ -164,8 +164,7 @@ To setup the project environment locally, use the following commands:
164164

165165
1. Build the backend and frontend containers:
166166
```bash
167-
make docker-build-backend
168-
make docker-build-frontend
167+
make docker-build
169168
```
170169

171170
## Running the Application
@@ -185,11 +184,11 @@ If you are not using Docker:
185184
If you are using Docker:
186185
1. Start the FastAPI server container:
187186
```bash
188-
make docker-up-backend
187+
make docker-start-backend
189188
```
190189
2. Start the Next.js development server container:
191190
```bash
192-
make docker-up-frontend
191+
make docker-start-frontend
193192
```
194193

195194
- **Backend**: Access the API at `http://localhost:8000`.

0 commit comments

Comments
 (0)