You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
3 years ago | |
---|---|---|
db | 3 years ago | |
public | 3 years ago | |
views | 3 years ago | |
.gitignore | 3 years ago | |
Dockerfile | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
docker-compose.yml | 3 years ago | |
index.js | 3 years ago | |
package-lock.json | 3 years ago | |
package.json | 3 years ago | |
platoo.sql | 3 years ago |
README.md
platoo
Instructions
Launch docker compose stack:
sudo docker-compose up
Now, find the ID of your PostgreSQL database:
sudo docker ps
# My output:
# CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# 1e211e6495ef postgres:9.6.18 "docker-entrypoint.s…" 15 minutes ago Up 15 minutes 5432/tcp platoo_postgresql_1
# 03577974bad6 victorm/platoo:v1 "node index.js" 15 minutes ago Up 15 minutes 0.0.0.0:8080->8080/tcp platoo_platoo_1
Mine is 1e211e6495ef
.
Now, we will copy our SQL file in the container and open a shell in it
docker cp platoo.sql 1e211e6495ef:/tmp
docker exec -ti 1e211e6495ef bash
Now, we will simply restore our file:
cd /tmp
psql -U platoo platoodb < platoo.sql