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.
Victor Moinard 585a470f91 3 years ago
db Parameterize configuration 3 years ago
public 3 years ago
views http to https 3 years ago
.gitignore Initial commit 3 years ago
Dockerfile Docker et sql 3 years ago
LICENSE Initial commit 3 years ago Improve README 3 years ago
docker-compose.yml maj docker id 3 years ago
index.js correction res.redirect 3 years ago
package-lock.json publication code source 3 years ago
package.json publication code source 3 years ago
platoo.sql move shogi 3 years ago



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>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