mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-22 12:58:13 -05:00
929ac3bd7c
this is required for test suite to use dns certbot request without talking to live or staging letsencrypt servers or production level dns providers. This is a backwards port from the v3 branch and opens the door for a full certificate cypress test
28 lines
579 B
Bash
28 lines
579 B
Bash
#!/bin/bash
|
|
|
|
# Colors
|
|
BLUE='\E[1;34m'
|
|
CYAN='\E[1;36m'
|
|
GREEN='\E[1;32m'
|
|
RED='\E[1;31m'
|
|
RESET='\E[0m'
|
|
YELLOW='\E[1;33m'
|
|
|
|
export BLUE CYAN GREEN RED RESET YELLOW
|
|
|
|
# Docker Compose
|
|
COMPOSE_PROJECT_NAME="npmdev"
|
|
COMPOSE_FILE="docker/docker-compose.dev.yml"
|
|
|
|
export COMPOSE_FILE COMPOSE_PROJECT_NAME
|
|
|
|
# $1: container_name
|
|
get_container_ip () {
|
|
local container_name=$1
|
|
local container
|
|
local ip
|
|
container=$(docker-compose ps --all -q "${container_name}" | tail -n1)
|
|
ip=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$container")
|
|
echo "$ip"
|
|
}
|