Initial Keila Cloudron package
This commit is contained in:
43
Dockerfile
Normal file
43
Dockerfile
Normal file
@ -0,0 +1,43 @@
|
||||
FROM cloudron/base:4.2.0
|
||||
|
||||
# Install dependencies
|
||||
RUN mkdir -p /app/code /app/data
|
||||
WORKDIR /app/code
|
||||
|
||||
# Install Elixir and dependencies
|
||||
RUN curl -fSL https://github.com/elixir-lang/elixir/releases/download/v1.15.7/elixir-otp-26.zip -o elixir.zip \
|
||||
&& unzip elixir.zip -d /opt/elixir \
|
||||
&& rm elixir.zip \
|
||||
&& ln -s /opt/elixir/bin/* /usr/local/bin/ \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y git build-essential cmake nodejs npm postgresql-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set environment variables
|
||||
ENV MIX_ENV=prod
|
||||
ENV PATH="/opt/elixir/bin:$PATH"
|
||||
|
||||
# Clone and build Keila
|
||||
RUN git clone --depth 1 --branch v0.14.7 https://github.com/pentacent/keila.git . \
|
||||
&& mix local.hex --force \
|
||||
&& mix local.rebar --force \
|
||||
&& mix deps.get --only prod \
|
||||
&& mix deps.compile \
|
||||
&& cd assets && npm ci && npm run deploy && cd .. \
|
||||
&& mix phx.digest \
|
||||
&& mix release
|
||||
|
||||
# Copy initialization data
|
||||
RUN cp -r _build/prod/rel/keila /tmp/keila-release
|
||||
|
||||
# Copy start script
|
||||
COPY start.sh /app/code/start.sh
|
||||
COPY nginx.conf /etc/nginx/sites-available/default
|
||||
|
||||
# Set permissions
|
||||
RUN chmod +x /app/code/start.sh \
|
||||
&& chown -R cloudron:cloudron /app/code /app/data /tmp/keila-release
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
CMD ["/app/code/start.sh"]
|
Reference in New Issue
Block a user