Installation with Docker
Prerequisites
Before installing Prophecies, ensure you have the following tools installed:
Docker: A platform for developing, shipping, and running applications inside isolated environments known as containers. Learn more about Docker.
Docker Compose: A tool for defining and running multi-container Docker applications. It uses a YAML file to configure your application's services, making it easier to manage complex setups. Get started with Docker Compose.
These tools are essential for running Prophecies efficiently and are widely used in the development and deployment of modern applications.
Setup steps
1. Prepare the Working Directory
Place this docker-compose.yml
file in your chosen directory. This will be the working directory for your Docker Compose setup:
2. Configure NGINX
You need to create an NGINX configuration file as referenced in your Docker Compose file (./nginx.conf
). Ensure this file is correctly configured to serve your Prophecies. It should be set up to listen on port 9999
and serve static files from the /static/
directory:
3. Starting Services
In your working directory, run the following command:
This command will download the necessary images (if not already downloaded), create the defined volumes, and start the services as background processes.
3. Database Migrations and Static Files
The docker-compose.yml
file specifies services for running database migrations (migration
) and collecting static files so they can be served by NGINX (collectstatic
). These services should automatically perform these tasks when you start Docker Compose.
4. Create Admin User
The database is currently empty, without user. To provision your first admin user, you must use the command line:
5. Accessing the Application
Once all services are up and running, the application should be accessible via : http://localhost:9999
6. Monitoring and Logs
To monitor the status of your Docker containers and check for any issues, you can use the Docker Compose logs command:
The -f
flag will follow the log output, allowing you to see real-time logs as they are generated.
7. Stopping and Removing Services
To stop the services without removing them, you can run:
If you need to stop and remove all the containers, networks, and volumes associated with your Docker Compose setup, use the down command:
This will clean up everything you have created and is particularly useful for starting from scratch. Please make sure you know what you're doing before running this command.
Additional Notes
This configuration doesn't include SSL setup for NGINX, which is recommended for production.
Regularly check for updates to the
icij/prophecies
image to keep your application up to date.To use custom domain, don't forget to update the
ALLOWED_HOSTS
variable.The application can be configured with many environment variables.
Last updated