File size: 858 Bytes
6ab6872
 
2b2af1d
 
 
6ab6872
2b2af1d
6ab6872
 
 
 
 
 
2b2af1d
6ab6872
 
 
2b2af1d
6ab6872
 
2b2af1d
6ab6872
 
2b2af1d
 
 
 
2ee7e70
2b2af1d
5044d7d
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
FROM cr.weaviate.io/semitechnologies/weaviate:1.30.0

# Install nginx using Alpine's package manager
RUN apk update && \
    apk add --no-cache nginx

# Set Weaviate env variables
ENV QUERY_DEFAULTS_LIMIT=25 \
    AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED=true \
    PERSISTENCE_DATA_PATH=/var/lib/weaviate \
    ENABLE_API_BASED_MODULES=true \
    CLUSTER_HOSTNAME=node1

# Create data dir
RUN mkdir -p /var/lib/weaviate && chmod 777 /var/lib/weaviate
VOLUME ["/var/lib/weaviate"]

# Add NGINX config
COPY nginx.conf /etc/nginx/nginx.conf

# Expose only the one port HuggingFace Spaces allows
EXPOSE 7860

# Start both Weaviate and NGINX
# CMD ["sh", "-c", "\
#     /bin/weaviate --host 127.0.0.1 --port 7860 --scheme http & \
#     nginx -g 'daemon off;'"]

CMD ["--host", "0.0.0.0", "--port", "7860", "--scheme", "http"]
# CMD ["nginx", "-g", "daemon off;"]