FROM atendai/evolution-api:v2.2.3 USER root RUN apk add --no-cache postgresql postgresql-contrib redis su-exec ENV SERVER_TYPE=http ENV SERVER_PORT=7860 ENV SERVER_URL=https://almbarmg-elevanlab.hf.space ENV DATABASE_ENABLED=true ENV DATABASE_PROVIDER=postgresql ENV DATABASE_CONNECTION_URI=postgresql://evolution:evolution@127.0.0.1:5432/evolution ENV CACHE_REDIS_ENABLED=true ENV CACHE_REDIS_URI=redis://127.0.0.1:6379 ENV AUTHENTICATION_API_KEY=123456 EXPOSE 7860 CMD sh -c "\ mkdir -p /tmp/postgres && \ chown -R postgres:postgres /tmp/postgres && \ su-exec postgres initdb -D /tmp/postgres && \ su-exec postgres pg_ctl -D /tmp/postgres -o '-h 127.0.0.1' -w start && \ su-exec postgres createdb evolution && \ su-exec postgres psql -c \"CREATE USER evolution WITH PASSWORD 'evolution';\" && \ su-exec postgres psql -c \"GRANT ALL PRIVILEGES ON DATABASE evolution TO evolution;\" && \ redis-server --daemonize yes && \ node ./dist/src/main.js"