- Prerequisite
- Start InstaPy container
- Stop InstaPy container
- Stop and remove InstaPy docker config
- Display InstaPy output logs
- Automatically run Instapy or at a specific time
- Deploy specific version of InstaPy
Before starting InstaPy container, you have to follow few steps to prepare your environment:
- Clone this repository
git clone https://github.com/InstaPy/instapy-docker.git
- Change your directory to docker-compose
cd docker-compose
- If you previously ran
InstaPy
the classical way you have to moveInstaPy
logs folder, which is by default saved in your home directory~/InstaPy
, into the current folder otherwise you will loose all your previous data
mv ~/InstaPy .
- Copy the quickstart example file to get started
cp -a docker_quickstart.py.example docker_quickstart.py
- Edit the file
docker_quickstart.py
to personalize how InstaPy will interact. All functions are the same than the classic installation mode. If you are new to InstaPy, we strongly suggest to have a look to InstaPy documentation to fully understand this file and how to modify it. Keep in mind all InstaPy functions should start withbot.
when running with Docker.
To make sure you always use the latest version of InstaPy, always start the container with the following command. This way, if a new version of InstaPy docker image is released, it will ensure to download it before starting the container.
docker-compose pull && docker-compose up -d web
docker-compose stop web
docker-compose down
Use one of the two following commands
docker logs -f instapy_web_1
docker logs --tail 50 -f $(docker ps -a | grep instapy_web | cut -d " " -f 1)
Use cron to run InstaPy automatically at a specific time. Example below: run it everyday at 8:30AM
- Edit your crontab file
- Add
30 8 * * * root cd /path_to_repo/docker-compose/ && docker-compose up -d
By default, you will use the latest version of InstaPy. For some reasons, if you want to run a specific version you could with adapting the starting command (see above) by replacing tag latest
with the desire released version of InstaPy.
It will then start a container of InstaPy with the corresponding version. Please be aware breaking chanes may exist between version and refers to the changelog of InstaPy to adapt your quickstart file.