-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 722 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (24 loc) · 722 Bytes
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
.PHONY: build static
# Load the .env file
ifneq (,$(wildcard ./.env))
include .env
export
endif
build:
docker build --platform linux/arm64 -t $(PROJECT_NAME) .
run:
docker run -v ./db.sqlite3:/app/db.sqlite3 --env-file=.env -p 8000:80 $(PROJECT_NAME)
build-amd:
docker build --platform linux/amd64 -t $(PROJECT_NAME)-amd .
save-image:
docker save -o tmp/stack.tar $(PROJECT_NAME)-amd
setup-project:
go mod download
python3 -m venv venv
. venv/bin/activate; pip install -r requirements.txt
cp .env.example .env
sed -i '' '1s/.*/DEBUG=True/' .env
. venv/bin/activate; python3 manage.py migrate
yarn install --check-files
yarn build
. venv/bin/activate; python3 manage.py collectstatic --noinput