File size: 954 Bytes
2849d65
ae84e13
2849d65
ae84753
2849d65
ae84753
2849d65
 
 
460dbca
2849d65
 
 
653bae4
2849d65
 
95422bb
2849d65
9f63425
2849d65
bb85394
2849d65
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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"