diff --git a/README.md b/README.md index a48ebe6..0e6388a 100644 --- a/README.md +++ b/README.md @@ -21,5 +21,5 @@ Completion files are generated **during build process** in `target/*/build/*/out Currently `ahab` respects three environment variables. - `COMPOSE_FILE`: control which docker-compose file is used - defaults to `docker/local/docker-compose.yaml` -- `AHAB_DJANGO_CONTAINER`: control which compose service is used for sending django commands - defaults to `appserver` -- `AHAB_POSTGRES_CONTAINER`: control which compose service is used for sending postgres commands - defaults to `postgresdb` +- `AHAB_DJANGO_CONTAINER`: control which compose service is used for sending django commands - defaults to `django` +- `AHAB_POSTGRES_CONTAINER`: control which compose service is used for sending postgres commands - defaults to `db` diff --git a/src/cli/docker_compose.rs b/src/cli/docker_compose.rs index b517229..3de53c3 100644 --- a/src/cli/docker_compose.rs +++ b/src/cli/docker_compose.rs @@ -20,7 +20,7 @@ pub enum DockerCompose { rest: Vec, }, - /// Print services + /// Print services Ps, /// Stop, build and start containers. diff --git a/src/main.rs b/src/main.rs index d2e09d9..05a3559 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,8 +34,7 @@ fn main() -> Result<()> { cli::Django::Test => scripts::django::test(), }, cli::Commands::Postgres { command } => { - let db_container = - std::env::var("AHAB_POSTGRES_CONTAINER").unwrap_or("postgresdb".to_string()); + let db_container = std::env::var("AHAB_POSTGRES_CONTAINER").unwrap_or("db".to_string()); match command { cli::Postgres::Import { path } => scripts::postgres::import(&db_container, &path), cli::Postgres::Dump { path } => scripts::postgres::dump(&db_container, &path), diff --git a/src/scripts/django.rs b/src/scripts/django.rs index 649afef..83e3bff 100644 --- a/src/scripts/django.rs +++ b/src/scripts/django.rs @@ -55,7 +55,7 @@ pub fn make_command(app: &PathBuf, name: &str) -> Result<()> { } pub fn manage(rest: &[String]) -> Result<()> { - let container = env::var("AHAB_DJANGO_CONTAINER").unwrap_or("appserver".to_string()); + let container = env::var("AHAB_DJANGO_CONTAINER").unwrap_or("django".to_string()); let joined = rest.join(" "); let command = format!("run --rm {container} python manage.py {joined}"); CommandBuilder::docker_compose().args(&command).exec() diff --git a/src/scripts/docker_compose.rs b/src/scripts/docker_compose.rs index 0f754a7..c5d403f 100644 --- a/src/scripts/docker_compose.rs +++ b/src/scripts/docker_compose.rs @@ -12,7 +12,7 @@ pub fn down() -> Result<()> { } pub fn exec(rest: &[String]) -> Result<()> { - let container = std::env::var("AHAB_DJANGO_CONTAINER").unwrap_or("appserver".to_string()); + let container = std::env::var("AHAB_DJANGO_CONTAINER").unwrap_or("django".to_string()); CommandBuilder::docker_compose() .args("exec") .args(&container)