Important: The Podman setup for OpenAtlas is currently experimental and not recommended for production environments. It is primarily intended for local development and testing. Expect potential instability or data loss. Use at your own risk.
Note: Commands below use Podman; Docker and docker compose are expected to work identically since this project follows the standard Compose Specification.
Before you begin, ensure you have the following installed and configured:
- Git: Required to clone the OpenAtlas repository.
- Podman:
- Follow upstream installation instructions: https://podman.io/docs/installation
-
Clone the Repository: Open your terminal or command prompt, navigate to where you want to store the project (e.g.,
C:\projectsor~/dev), and run:git clone https://github.com/craws/OpenAtlas.git cd OpenAtlas # Navigate into the cloned directory
-
Set Environment Variables: OpenAtlas requires database credentials, which are passed via a
.envfile in the project's root directory (the same directory ascompose.yaml).- Windows (cmd):
(echo POSTGRES_DB=openatlas & echo POSTGRES_PASSWORD=openatlas) > .env
- Linux/MacOS/Windows (WSL):
printf "POSTGRES_DB=openatlas\nPOSTGRES_PASSWORD=openatlas\n" > .env
- Warning: The password
openatlasis insecure and only suitable for local environment. Do not use this password in any shared or production-like environment.
- Windows (cmd):
-
Pull Latest Images (Optional but Recommended): Ensure you have the latest versions of pre-built images like PostGIS and Discovery (check
compose.yamlfor exact image names/tags):podman compose pull
-
Start the Containers: In your terminal, ensure you are inside the
OpenAtlasproject directory, then run:podman compose up --detach
--detach(or-d) runs the containers in the background.- First Run: The first time you run this command, it will take significantly longer. Podman needs to:
- Download base images.
- Build the custom OpenAtlas images (
openatlas,initdb,discoveryif applicable) based on their Containerfiles. - Start the PostgreSQL container and wait for it to be healthy.
- Run the
initdbservice to create the database structure and initial data (only if the database is empty). - Start the OpenAtlas and Discovery application containers.
-
Monitor Logs (Especially on First Run): It's highly recommended to watch the logs during the first startup to see the progress and catch any errors:
# View and follow logs from all services (press Ctrl+C to stop) podman compose logs -f # View logs from a specific service (useful for debugging) podman compose logs -f initdb # Database initialization podman compose logs -f postgres # PostgreSQL database logs podman compose logs -f openatlas # OpenAtlas backend application logs podman compose logs -f discovery # OpenAtlas Discovery frontend logs
An additional experimental stack is available for testing OpenAtlas with Gunicorn instead of Apache. It uses the same PostgreSQL, database initialization, and OpenAtlas Discovery services as the default setup, and publishes the application directly on port 8081.
To install development dependencies (e.g. pytest) at runtime in the Gunicorn container, set the UV_DEV environment variable to true in your .env file:
echo "UV_DEV=true" >> .envOr pass it directly when starting the containers:
UV_DEV=true podman compose -f compose-gunicorn.yaml up --detachStart this variant from the project root after setting the database environment variables as described above:
podman compose -f compose-gunicorn.yaml up --detachThe Gunicorn stack can run IIIF in a dedicated Cantaloupe container
(iiif). This keeps OpenAtlas and IIIF separate without changing OpenAtlas
core code.
- OpenAtlas writes converted files to a shared path under
/var/www/iipsrv/ - Cantaloupe serves IIIF at
http://localhost:8180/iiif/2/(identifier only)
For tests/CI, keep using tests as folder name:
IIIF = {
'enabled': True,
'path': '/var/www/iipsrv/tests/',
'url': 'http://iiif/iiif/2/',
'version': 2,
'conversion': True,
'compression': 'jpeg'}For host/browser access to generated images, use:
http://localhost:8180/iiif/2/<your-image>.tiff/full/full/0/default.jpg
For production, use a neutral folder name (for example images) and a public
HTTPS URL:
IIIF = {
'enabled': True,
'path': '/var/www/iipsrv/images/',
'url': 'https://iiif.your-domain.tld/iiif/2/',
'version': 2,
'conversion': True,
'compression': 'jpeg'}OpenAtlas is then available at http://localhost:8081. To follow the application logs, run:
podman compose -f compose-gunicorn.yaml logs -f openatlas-gunicornTo rebuild this variant after changing its image or application code, use:
podman compose -f compose-gunicorn.yaml build
podman compose -f compose-gunicorn.yaml up -d --force-recreateStop the Gunicorn variant with:
podman compose -f compose-gunicorn.yaml downApplies to both stacks. Discovery runs on http://localhost:3000 and calls the
OpenAtlas API directly from the browser — on http://localhost:8080 in the
default stack, http://localhost:8081 in the Gunicorn variant. Because these
are different origins, the API must send a CORS header. Without it, map and
network views fail with a network error in the browser console.
Both compose files therefore set CORS_ALLOWANCE=http://localhost:3000 by
default. To allow a different origin, override it in your .env file:
echo "CORS_ALLOWANCE=*" >> .envOnce the containers are up and running (check podman compose ps shows services as "running" or "healthy", you can access the applications in your web browser:
- OpenAtlas Backend/UI: http://localhost:8080
- OpenAtlas Discovery Frontend: http://localhost:3000 (If included in your
compose.yaml, included by default)
To stop and remove the containers and networks defined in the compose file:
podman compose downThis stops the application but preserves data in named volumes (db-data, openatlas-uploads, openatlas-resized, openatlas-export).
To also remove the named volumes (deletes all database and file data — irreversible):
podman compose down -vpodman compose up --detachOn first run, initdb automatically creates the schema from the SQL scripts in ./install/.
podman compose down
podman volume rm openatlas_db-data
podman compose up --detachRequires placing an SQL file at openatlas-initdb-1:/var/www/openatlas/files/dump.sql.
podman compose down
podman volume rm openatlas_db-data
podman compose up --no-start
podman cp ./my_dump.sql openatlas-initdb-1:/var/www/openatlas/files/dump.sql
podman compose startinitdb detects the dump automatically and restores it instead of running the install scripts.
podman logs openatlas-initdb-1Look for Initialization verified. at the end.
- Check Container Status: Use
podman compose psto see which services are running, stopped, or unhealthy. - Check Logs: Use
podman compose logs -f [SERVICE_NAME](e.g.,podman compose logs -f openatlas) to view logs for specific services and diagnose issues. - Rebuild Custom Images: If you modify code that requires rebuilding the custom Container images (e.g., changes in the application source code included in the Containerfile build context, or changes to the Containerfile itself):
# Rebuild images using Podman's build cache (faster)
podman compose build
# Rebuild images without using the cache (more thorough, slower)
podman compose build --no-cacheAfter rebuilding, restart the services, applying the changes and recreating containers:
podman compose up -d --force-recreate