Skip to content

Commit f7ca993

Browse files
committed
πŸ€–βœ… Final v0.8.0
All should be working for now. Final v0.8.0 release!!!
1 parent 1c947fe commit f7ca993

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+68336
-3357
lines changed

β€Ž.dockerignoreβ€Ž

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ Dockerfile.node
9494
old_seerr-reference/
9595

9696
# Data directories (will be mounted as volumes)
97-
# Note: Essential data files (unified.json, franchises.json, regex-presets.json) and images/
97+
# Note: Essential data files (unified.json, franchises.json, regex-presets.json, seerr-collections.json)
9898
# should be in git and will be included in the image. Use Git LFS for large files if needed.
9999
# Users can still override with volume mounts if needed
100-
# data/images/** - REMOVED: Images are now included in the image
100+
# Exclude data/images/ but explicitly include data/*.json files
101+
data/images/**
102+
!data/*.json
101103
public/cache/
102104

103105
# Test files

β€Ž.env.localβ€Ž

Lines changed: 0 additions & 2 deletions
This file was deleted.

β€Ž.gitattributesβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€ŽDockerfile.nodeβ€Ž

Lines changed: 0 additions & 23 deletions
This file was deleted.

β€ŽDockerfile.unifiedβ€Ž

Lines changed: 70 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,34 @@ RUN echo "Verifying logs API routes in build output..." && \
9292
else \
9393
echo "βœ… Found: logs-statistics.get.mjs"; \
9494
fi && \
95-
echo "βœ… All logs API routes verified successfully"
95+
echo "βœ… All logs API routes verified successfully" && \
96+
echo "" && \
97+
echo "Verifying collections API routes..." && \
98+
if [ ! -f ".output/server/chunks/routes/api/collections.get.mjs" ]; then \
99+
echo "❌ Missing route: collections.get.mjs"; \
100+
exit 1; \
101+
else \
102+
echo "βœ… Found: collections.get.mjs"; \
103+
fi && \
104+
if [ ! -d ".output/server/chunks/routes/api/collections" ]; then \
105+
echo "❌ ERROR: collections/ directory not found in build output!"; \
106+
exit 1; \
107+
else \
108+
echo "βœ… Found: collections/ directory"; \
109+
fi && \
110+
if [ ! -f ".output/server/chunks/routes/api/seerr-collections.get.mjs" ]; then \
111+
echo "❌ Missing route: seerr-collections.get.mjs"; \
112+
exit 1; \
113+
else \
114+
echo "βœ… Found: seerr-collections.get.mjs"; \
115+
fi && \
116+
if [ ! -d ".output/server/chunks/routes/api/seerr-collections" ]; then \
117+
echo "❌ ERROR: seerr-collections/ directory not found in build output!"; \
118+
exit 1; \
119+
else \
120+
echo "βœ… Found: seerr-collections/ directory"; \
121+
fi && \
122+
echo "βœ… All collections API routes verified successfully"
96123

97124
# ==============================================================================
98125
# Stage 3: Final Unified Image
@@ -177,31 +204,52 @@ COPY --from=node-builder /app/frontend/node_modules /app/node_modules
177204

178205
WORKDIR /app
179206

180-
# Copy application code
181-
COPY . .
182-
183-
# Copy MySQL initialization scripts
184-
COPY mysql-init /docker-entrypoint-initdb.d/
185-
186-
# Create necessary directories
187-
RUN mkdir -p /app/logs /app/data /var/lib/mysql /var/run/mysqld && \
207+
# Create necessary directories first
208+
RUN mkdir -p /app/logs /app/data /app/data-default /var/lib/mysql /var/run/mysqld && \
188209
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld && \
189210
chmod 755 /var/lib/mysql /var/run/mysqld
190211

191-
# Explicitly copy essential data files and images if they exist in build context
212+
# Explicitly copy essential data files (JSON only - images are now fetched from TMDB)
213+
# Copy data directory BEFORE copying the rest of the application to ensure files are in build context
192214
# These files should be committed to git (use Git LFS if too large)
193-
RUN if [ -d "data" ]; then \
194-
mkdir -p /app/data /app/data-default /app/data/images /app/data-default/images && \
195-
cp -r data/*.json /app/data/ 2>/dev/null || true && \
196-
cp -r /app/data/*.json /app/data-default/ 2>/dev/null || true && \
197-
if [ -d "data/images" ]; then \
198-
cp -r data/images/* /app/data/images/ 2>/dev/null || true && \
199-
cp -r /app/data/images/* /app/data-default/images/ 2>/dev/null || true; \
200-
fi && \
201-
chmod -R 755 /app/data /app/data-default; \
202-
else \
203-
echo "Warning: data/ directory not found in build context. Essential files should be in git."; \
204-
fi
215+
# Note: This will fail if data/ directory doesn't exist, which is desired behavior
216+
COPY data/ /tmp/data/
217+
218+
# Verify and copy critical data files (fail build if missing)
219+
RUN echo "Verifying essential data files..." && \
220+
if [ ! -d "/tmp/data" ]; then \
221+
echo "❌ ERROR: data/ directory not found in build context"; \
222+
echo " Ensure data/ directory exists and contains required JSON files"; \
223+
exit 1; \
224+
fi && \
225+
MISSING=0 && \
226+
for file in seerr-collections.json unified.json franchises.json regex-presets.json; do \
227+
if [ -f "/tmp/data/$file" ]; then \
228+
cp "/tmp/data/$file" "/app/data/$file" && \
229+
echo "βœ… Found: $file ($(du -h /app/data/$file | cut -f1))"; \
230+
else \
231+
echo "❌ ERROR: Missing critical data file: $file"; \
232+
MISSING=1; \
233+
fi; \
234+
done && \
235+
if [ "$MISSING" -eq 1 ]; then \
236+
echo "❌ Build failed: Critical data files are missing from build context."; \
237+
echo " Ensure data/*.json files are committed to git and not excluded by .dockerignore"; \
238+
exit 1; \
239+
fi && \
240+
# Copy all other JSON files from data directory if they exist
241+
cp /tmp/data/*.json /app/data/ 2>/dev/null || true && \
242+
# Copy to data-default as backup
243+
cp -r /app/data/*.json /app/data-default/ 2>/dev/null || true && \
244+
chmod -R 755 /app/data /app/data-default && \
245+
rm -rf /tmp/data && \
246+
echo "βœ… All essential data files verified successfully"
247+
248+
# Copy application code (after data files are verified)
249+
COPY . .
250+
251+
# Copy MySQL initialization scripts
252+
COPY mysql-init /docker-entrypoint-initdb.d/
205253

206254
# Copy supervisor configuration
207255
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

0 commit comments

Comments
Β (0)