The build command needs to be run from Hypha root so it can copy needed files. The other commands are easier to run directly from the "docker" sub directory.
Start the docker environment
Move to the "docker" directory.
1
$ cd docker
Copied!
To start the docker containers you use the "up" command. This command you will use each time you want to start up and use this docker environment.
To get bash shell on the container that runs the Django app, use this command.
1
docker-compose exec py bash
Copied!
Here you can issue django commands as normal. You might want to change the user - the default is circleci, but most of the code is owned by the user 'node'. To do that:
docker-compose exec -u node py bash
To get a shell on the container that runs Postgres, use this command.
1
docker-compose exec db bash
Copied!
Stop the docker environment.
Press ctrl+c in the terminal window.
Restore a database dump in Docker
We will use the "public/sandbox_db.dump" for this example. That is a good start in any case, you get some example content etc.
First get a shell on the db container.
1
docker-compose exec db bash
Copied!
Then in that shell you need to install wget to download the db dump.