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.
Place this docker-compose.yml
file in your chosen directory. This will be the working directory for your Docker Compose setup:
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:
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.
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.
The database is currently empty, without user. To provision your first admin user, you must use the command line:
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.
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.