-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
95 lines (72 loc) · 1.73 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# # Runtime stage
# FROM ubuntu:22.04
# # Install runtime dependencies
# RUN apt-get update && \
# apt-get install -y \
# libssl-dev \
# ca-certificates \
# && rm -rf /var/lib/apt/lists/*
# WORKDIR /app
# # Copy the locally built binary (from project root)
# COPY target/release/vane_web3_app /app/vane_web3_app
# # Create logs directory
# RUN mkdir -p /app/logs
# # Make binary executable
# RUN chmod +x /app/vane_web3_app
# CMD ["./vane_web3_app"]
FROM rust:latest
WORKDIR /app
COPY . .
RUN apt-get update && \
apt-get install -y \
protobuf-compiler \
clang \
libclang-dev \
llvm-dev \
libssl-dev \
pkg-config
# Set permissions for db directory
RUN chmod -R 777 db/
# Check files before generation
RUN echo "=== Files before Prisma generation ===" && \
ls -la db/src/
# Run Prisma commands
RUN cargo run -p prisma migrate dev --name initial_migration --create-only --schema="db/schema.prisma"
RUN cargo run -p prisma generate --schema="db/schema.prisma"
# Check files after generation
RUN echo "=== Files after Prisma generation ===" && \
ls -la db/src/
RUN cargo build --release
ENTRYPOINT ["./target/release/vane_web3_app"]
CMD []
#FROM rust:latest
#WORKDIR /app
#COPY . .
#
#RUN apt-get update && \
# apt-get install -y \
# protobuf-compiler \
# clang \
# libclang-dev \
# llvm-dev \
# libssl-dev \
# pkg-config
#
#RUN ls -la
#RUN ls -la db/
#RUN cargo check
#RUN cargo build --release
#ENTRYPOINT ["./target/release/vane_web3_app"]
#CMD []
#FROM --platform=linux/arm64 ubuntu:latest
#WORKDIR /app
#
#COPY vane_web3_app .
#
#RUN apt-get update && \
# apt-get install -y \
# libssl-dev \
# && rm -rf /var/lib/apt/lists/*
#
#ENTRYPOINT ["./vane_web3_app"]
#CMD []