-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathDockerfile
122 lines (52 loc) · 1.68 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
# Use a specific version of Ubuntu as the base image
FROM ubuntu:24.04
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive \
TZ="Etc/UTC" \
PATH="/root/.local/bin/:$PATH"
# Install minimal runtime dependencies
RUN apt-get update && \
apt-get install -y \
python3 \
python3-pip \
python3-venv \
postgresql-client \
software-properties-common \
tzdata \
ffmpeg \
curl \
unzip \
git && \
# Add the PPA and install audiowaveform
add-apt-repository ppa:chris-needham/ppa && \
apt-get update && \
apt-get install -y audiowaveform && \
# Install UV
curl -sSL https://astral.sh/uv/install.sh -o /uv-installer.sh && \
sh /uv-installer.sh && \
rm /uv-installer.sh && \
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_23.x | bash - && \
apt-get install -y nodejs && \
# Clean up
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy only the files needed for dependency installation and runtime
COPY . .
# Copy environment variables for initial build
# We use dynamic environment variables at runtime
# No .env file needed during build
# Install node dependencies and build frontend
RUN npm ci && \
npm install && \
npm run build
# Ensure entrypoint script is executable
RUN chmod +x docker-entrypoint.sh
# Expose port
EXPOSE 3000
# Remove environment variables file after build
# No need to remove .env as we don't create it
# Define default command
CMD ["./docker-entrypoint.sh"]