Spaces:
Sleeping
Sleeping
File size: 1,345 Bytes
4d44cc9 168d3ed be05700 168d3ed 864557c 168d3ed b4e2c6b 864557c 168d3ed 3aab175 |
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
FROM typesense/typesense:27.1
# Expose the default Typesense port
EXPOSE 8108
EXPOSE 7860
ENV PORT=7860
RUN rm -f /etc/apt/sources.list.d/*.list && \
apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
sudo \
git \
wget \
procps \
git-lfs \
zip \
unzip \
htop \
vim \
nano \
bzip2 \
libx11-6 \
build-essential \
libsndfile-dev \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
RUN add-apt-repository ppa:flexiondotorg/nvtop && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends nvtop
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install -y nodejs && \
npm install -g configurable-http-proxy
# Set environment variables for Typesense
ENV TYPESENSE_DATA_DIR=/data
ENV TYPESENSE_API_KEY=Hu52dwsas2AdxdE
RUN adduser --disabled-password --gecos '' --shell /bin/bash user
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user
USER user
ENV HOME=/home/user
RUN mkdir $HOME/.cache $HOME/.config \
&& chmod -R 777 $HOME
USER root
RUN mkdir /data && chown user:user /data
USER user
# Set the working directory
WORKDIR /data
# Start Typesense server
CMD ["--data-dir", "/data", "--api-key=Hu52dwsas2AdxdE", "--listen-port", "7860","--enable-cors"] |