-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (42 loc) · 1.27 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Create .env file
install:
@echo "Creating .env file..."
@echo "[email protected]" > .env
@echo "INVISION_PASSWORD=your_password" >> .env
@echo "TEST_MODE=0" >> .env
@echo "ROOT=." >> .env
@echo "DOCS_ROOT=/backend/src/static/docs" >> .env
@echo "" >> .env
@echo "#PROD_PORT=80" >> .env
@echo "" >> .env
@echo "#CUSTOM_CA_FILE=custom.ca-bundle.crt" >> .env
@echo "" >> .env
@echo "#PYTHON_REGISTY_URL=http://nexus/repository/pypi/simple" >> .env
@echo "" >> .env
@echo "#NPM_REGISTRY_SERVER=http://nexus/repository/npm-group" >> .env
@echo ".env file created successfully."
# Open browser at localhost:3000
open-browser:
@echo "Opening browser on http://localhost:3000"
open http://localhost:3000
# Run in dev mode
dev:
docker compose build
docker compose up -d
$(MAKE) open-browser
# Run in production mode
prod:
docker compose -f compose.prod.yml build
docker compose -f compose.prod.yml up -d
# Stop all
stop:
docker compose down
# Scrape from CLI
scrape:
docker exec backend poetry run python -m src.scraper.main
# Scrape with 'update' option
scrape-update:
docker exec backend poetry run python -m src.scraper.main update
# Scrape with 'overwrite' option
scrape-overwrite:
docker exec backend poetry run python -m src.scraper.main overwrite