This guide explains how to deploy the MVP AskNebula service using Docker and Docker Compose.
- Docker installed on your server
- Docker Compose installed on your server
- Your API keys and credentials ready for the
.env
file
-
Clone the repository to your server:
git clone https://github.com/yourusername/mvp-ask-nebula.git cd mvp-ask-nebula
-
Create your
.env
file from the template:cp .env.example .env
-
Edit the
.env
file with your actual API keys and credentials:nano .env
-
Build and start the container in detached mode:
docker-compose up -d
-
Check the container status:
docker-compose ps
-
View the logs:
docker-compose logs
To follow the logs in real-time:
docker-compose logs -f
docker-compose stop
docker-compose restart
docker-compose up -d --build
docker-compose down
The Docker Compose configuration is set up to preserve:
- The
last_mention.json
file, which tracks which Twitter mentions have been processed - The
twitter_bot.log
file for logging
These files are mounted as volumes from your host system to the container.
-
If the container fails to start, check the logs:
docker-compose logs
-
If you update your code, remember to rebuild the container:
docker-compose up -d --build
-
If you're having authentication issues, verify that your
.env
file is correctly mounted by checking:docker-compose exec asknebula cat .env
-
To enter the container for debugging:
docker-compose exec asknebula bash