-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (43 loc) · 1.68 KB
/
Copy pathDockerfile
File metadata and controls
59 lines (43 loc) · 1.68 KB
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
FROM debian:bullseye-slim
# Install required system packages
RUN apt-get update && apt-get install -y \
curl \
wget \
unzip \
procps \
supervisor
# Install Node.js 20
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /usr/src/app
# Copy package files and install backend dependencies
COPY /phoenix-server-wallet/backend/package*.json ./backend/
RUN cd backend && npm install
# Copy package files and install frontend dependencies
COPY /phoenix-server-wallet/client/package*.json ./client/
RUN cd client && npm install
# Set OpenSSL legacy provider to prevent Webpack errors in newer Node versions
ENV NODE_OPTIONS=--openssl-legacy-provider
# Copy the rest of the project
COPY /phoenix-server-wallet/ .
# Build frontend
RUN cd client && npm run build
# Download and install phoenixd daemon
RUN wget https://github.com/ACINQ/phoenixd/releases/download/v0.4.2/phoenix-0.4.2-linux-x64.zip \
&& unzip -j phoenix-0.4.2-linux-x64.zip -d /usr/local/bin/ \
&& chmod +x /usr/local/bin/phoenixd \
&& rm phoenix-0.4.2-linux-x64.zip
RUN mkdir -p /usr/src/app/backend/dbjson
RUN chmod -R 755 /usr/src/app/backend/dbjson
# Entrypoint and helper scripts
COPY ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
COPY ./check-phoenixd.sh /usr/local/bin/check-phoenixd.sh
COPY ./check-ui.sh /usr/local/bin/check-ui.sh
RUN chmod 755 /usr/local/bin/docker_entrypoint.sh \
&& chmod +x /usr/local/bin/check-phoenixd.sh \
&& chmod +x /usr/local/bin/check-ui.sh
# Expose backend port
EXPOSE 32400
# ENTRYPOINT ["/usr/local/bin/docker_entrypoint.sh"]