Local commands cheatsheet¶
- Set up a project
- Deploy test server
divio project deploy
(applies totest
server by default; optionally, specifylive
)- Update local project code:
divio project update
(pulls code, updates and builds local images, runs migrations)- Build local
web
image (e.g. after updatingrequirements.in
) docker-compose build web
- Push/pull code
- use
git
add
/commit
//pull
commands as appropriate - Pull media/database
divio project pull media
/divio project pull db
(applies totest
server by default; optionally,specifylive
)divio project push media
/divio project push db
(applies totest
server by default; optionally, specifylive
)
- Start a project
divio project up
, ordocker-compose run —rm —service-ports web
- Stop a project
divio project stop
, or exit the command with Control-C.
- Run a specific command inside the web container
docker-compose run —rm web <command>
- Run a specific command inside the web container, exposing the ports listed in the
Dockerfile
docker-compose run —rm —service-ports web <command>
- List running containers
docker ps
- List all containers
docker ps -a
- List images
docker image ls
- Remove all stopped containers
docker container prune
- Remove all unused containers and images
docker system prune