https://github.com/opencdms/surface
https://github.com/opencdms/surface
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/opencdms/surface
- Owner: opencdms
- License: gpl-3.0
- Created: 2021-09-17T17:00:56.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T04:39:02.000Z (over 1 year ago)
- Last Synced: 2024-10-30T07:21:59.856Z (over 1 year ago)
- Language: HTML
- Size: 32.8 MB
- Stars: 5
- Watchers: 7
- Forks: 4
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Surface
## Run Docker
docker-compose up
## Run and Stop the project
docker-compose -f docker-compose-dev.yml up
docker-compose -f docker-compose-dev.yml stop
## Production env
in api file add the production env, you can find a example in "./api/production.env.example", add the values of variables, in hosts and ports you can put 0.
## Generate Docker Images
docker-compose -f docker-compose-dev.yml build
## Running with Docker
docker-compose -f docker-compose-dev.yml up postgres cache redis api
## Load initial data
docker-compose -f docker-compose-dev.yml exec api bash load_initial_data.sh
### if you're using windows
docker-compose -f docker-compose-dev.yml exec api bash
python manage.py migrate
python manage.py loaddata /surface/fixtures/*
## Create superuser
docker-compose -f docker-compose-dev.yml exec api python manage.py createsuperuser
## Collect static files before build for production
docker-compose -f docker-compose-prd.yml -p surface_new exec api bash load_initial_data.sh
docker-compose -f docker-compose-prd.yml -p surface_new exec api python manage.py collectstatic --noinput
## Loading data
docker-compose -f docker-compose-dev.yml exec postgres pg_restore -U dba -d surface_db /data/shared/dump_surface_20211114.dump
docker-compose -f docker-compose-dev.yml exec postgres psql -U dba -d surface_db -c "\COPY raw_data FROM '/data/shared/dump_raw_data_20211130.csv' WITH DELIMITER ',' CSV HEADER;"
## Access DB manually
docker-compose -f docker-compose-dev.yml exec postgres psql -U dba -d surface_db