You can use a specialized Docker image to run Atlas migrations for the ENT backend. This requires building the image locally first and then running it with the appropriate PostgreSQL environment variables.
1. Build the image
docker build . -t atlas-migration
2. Run the migration
Depending on your database location, use one of the following commands:
Local Server
If the database is running on your host machine, use host.docker.internal as the PGHOST:
docker run -e PGHOST=host.docker.internal \
-e PGPORT=5432 \
-e PGDATABASE=guac \
-e PGUSER=guac \
-e PGPASSWORD=guac \
--network bridge \
atlas-migration
Remote Server
For remote databases, provide the specific connection details via environment variables:
docker run -e PGHOST=your_host \
-e PGPORT=your_port \
-e PGDATABASE=your_database \
-e PGUSER=your_user \
-e PGPASSWORD=your_password \
atlas-migration
docker build . -t atlas-migration