Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nachokhan/test_p4d_abm
https://github.com/nachokhan/test_p4d_abm
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nachokhan/test_p4d_abm
- Owner: nachokhan
- Created: 2021-09-25T17:34:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-27T22:05:19.000Z (over 3 years ago)
- Last Synced: 2024-11-16T20:44:06.949Z (2 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# test_p4d_abm
# Setup
## Install requirements
pip install -r requirements.txt
## Create configuration files
for i in $(find . -name '*._sample'); do cp "$i" "${i%.*}"; done;## Install Docker Postgress
### Pull Docker Postgress image
sudo docker pull postgres:latest
### Run docker image
For running this the file called exactly docker-compose.yml should exist.
sudo docker-compose up
### Dump DB into docker volume
#### Enter the container's bash.
sudo docker exec -it pg_container_pix4d_test bash
#### Connect to psql terminal
psql -h pg_container_pix4d_test -d pix4d_test -U root
#### Dump the data file in the dB
psql -h pg_container_pix4d_test -d pix4d_test -U root -f infile# DATABASE
## Connect to the database
### Enter the container's bash.
sudo docker exec -it pg_container_pix4d_test bash
### Connect to psql terminalk
psql -h pg_container_pix4d_test -d pix4d_test -U root
### Dump the data file in the dB
psql -h pg_container_pix4d_test -d pix4d_test -U root -f infile# Usefull commands
## Docker
### List volumes
sudo docker volume ls
### Remove volume
sudo docker volume rm -f
If this gives error, should also remove the associated container: the long ID between brackets: [xxxxxxxxxxx]
### Remove container
sudo docker rm## BASH
### Check open port
sudo lsof -i -P | grep ':5432 '
Answer means: (1 = Closed, 0=Opened)
### Close port
sudo kill