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