-
Notifications
You must be signed in to change notification settings - Fork 109
/
prodbox.Dockerfile
56 lines (38 loc) · 1.39 KB
/
prodbox.Dockerfile
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
FROM node:20.13.0 as base
# Install system dependencies
RUN apt-get update && apt-get install -y vim redis-tools postgresql-client htop curl libpq-dev build-essential
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install Poppler tools
WORKDIR /tmp/
COPY ./connectors/admin/docker_build/install_poppler_tools.sh ./
RUN chmod +x ./install_poppler_tools.sh && \
./install_poppler_tools.sh && \
ldconfig
# Set library path for Poppler
ENV LD_LIBRARY_PATH=/usr/local/lib
# Set the working directory to /dust
WORKDIR /dust
COPY . .
# Types dependencies
RUN cd types && npm ci
# Api client dependencies
RUN cd sdks/js && npm ci
# Connectors dependencies
RUN cd connectors && npm ci
# Front dependencies
RUN cd front && npm ci
# Now copy the rest of the code
RUN cd types && npm run build
RUN cd sdks/js && npm run build
RUN cd connectors && npm run build
RUN cd front && FRONT_DATABASE_URI="sqlite:foo.sqlite" npm run build
# Set the default start directory to /dust when SSH into the container
WORKDIR /dust
# Wraning and prompt
RUN echo "echo -e \"\033[0;31mWARNING: This is a PRODUCTION system!\033[0m\"" >> /root/.bashrc
RUN echo "export PS1='\[\e[0;31m\]prodbox\[\e[0m\]:\w\$ '" >> /root/.bashrc
ENV GIT_SSH_COMMAND="ssh -i ~/.ssh/github-deploykey-deploybox"
# Set a default command
CMD ["/dust/prodbox/init.sh"]