Production config fixes
- Deletes redundant files - Adds right-tree db env vars to default.env - Updates port mapping for docker-compose.production.yaml - Adjusts production methods in dev
This commit is contained in:
parent
e99cf44312
commit
ecc6e9eabe
6 changed files with 41 additions and 67 deletions
20
dev
20
dev
|
@ -40,7 +40,7 @@ cmd_load_shapefiles() {
|
|||
|
||||
cmd_create_plant_fixtures() {
|
||||
echo "Creates fixtures for plants using spreadsheet."
|
||||
docker-compose exec django-backend python manage.py createplantfixtures
|
||||
docker-compose exec backend python manage.py createplantfixtures
|
||||
}
|
||||
|
||||
cmd_reset_plants() {
|
||||
|
@ -94,14 +94,24 @@ cmd_start() {
|
|||
docker-compose up --remove-orphans
|
||||
}
|
||||
|
||||
cmd_create_staticfiles() {
|
||||
cmd_collectstatic() {
|
||||
docker-compose -f docker-compose.production.yaml build
|
||||
docker-compose run backend python manage.py collectstatic --no-input
|
||||
docker-compose run frontend npm run-script build
|
||||
docker-compose -f docker-compose.production.yaml run backend python manage.py collectstatic --no-input
|
||||
}
|
||||
|
||||
cmd_build_frontend() {
|
||||
docker run -v $PWD/frontend:/app -w /app node:16-alpine3.11 npm install
|
||||
docker run -v $PWD/frontend:/app -w /app node:16-alpine3.11 mkdir -p node_modules/.cache
|
||||
docker run -v $PWD/frontend:/app -w /app node:16-alpine3.11 chmod -R 777 node_modules/.cache
|
||||
docker run -v $PWD/frontend:/app -w /app node:16-alpine3.11 npm run build
|
||||
}
|
||||
|
||||
cmd_create_staticfiles() {
|
||||
cmd_collectstatic
|
||||
cmd_build_frontend
|
||||
}
|
||||
|
||||
cmd_build_production() {
|
||||
cmd_create_staticfiles
|
||||
docker-compose -f docker-compose.production.yaml build
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue