mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
git actions v2
This commit is contained in:
parent
6c8e84eed4
commit
7dd4d8ae86
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ./scripts/env_functions.sh
|
||||
source ./Docker/scripts/env_functions.sh
|
||||
|
||||
if [ "$DOCKER_ENV" != "true" ]; then
|
||||
export_env_vars
|
18
Docker/scripts/env_functions.sh
Executable file
18
Docker/scripts/env_functions.sh
Executable file
@ -0,0 +1,18 @@
|
||||
export_env_vars() {
|
||||
if [ -f .env ]; then
|
||||
while IFS='=' read -r key value; do
|
||||
if [[ -z "$key" || "$key" =~ ^\s*# || -z "$value" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
key=$(echo "$key" | tr -d '[:space:]')
|
||||
value=$(echo "$value" | tr -d '[:space:]')
|
||||
value=$(echo "$value" | tr -d "'" | tr -d "\"")
|
||||
|
||||
export "$key=$value"
|
||||
done < .env
|
||||
else
|
||||
echo ".env file not found"
|
||||
exit 1
|
||||
fi
|
||||
}
|
@ -27,11 +27,11 @@ COPY ./.env.example ./.env
|
||||
|
||||
COPY ./Docker ./Docker
|
||||
|
||||
RUN chmod +x ./Docker/deploy_database.sh
|
||||
RUN chmod +x ./Docker/scripts/*
|
||||
|
||||
ENV DATABASE_CONNECTION_URI=postgres://postgres:pass@localhost/evolution
|
||||
|
||||
RUN ./Docker/deploy_database.sh
|
||||
RUN ./Docker/scripts/deploy_database.sh
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user