File tree Expand file tree Collapse file tree 3 files changed +9
-13
lines changed
microservices/the_monkeys_storage Expand file tree Collapse file tree 3 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -210,10 +210,10 @@ services:
210210 - db-migrations
211211 - the_monkeys_db
212212 volumes :
213- - ./profile:/app/profile # Mount existing production files
214- - ./blogs:/app/blogs # Mount existing production files
215- - profile_volume :/app/profile # Persist /app/profile data
216- - blogs_volume :/app/blogs # Persist /app/ blogs data
213+ - ./profile:/app/profile # Mount existing production files where code expects them
214+ - ./blogs:/app/blogs # Mount existing production files where code expects them
215+ - ./local_profiles :/app/local_profiles # Mount local profiles sync directory
216+ - ./local_blogs :/app/local_blogs # Mount local blogs sync directory
217217 ports :
218218 - " ${MICROSERVICES_STORAGE_PORT}:${MICROSERVICES_STORAGE_INTERNAL_PORT}"
219219 restart : unless-stopped
@@ -411,7 +411,3 @@ volumes:
411411 driver : local
412412 minio_data :
413413 driver : local
414- profile_volume :
415- driver : local
416- blogs_volume :
417- driver : local
Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ RUN apk --no-cache add ca-certificates tzdata && \
3737WORKDIR /app
3838
3939# Create directories for storage (matching volume mounts)
40- RUN mkdir -p /profile /blogs && \
41- chown -R appuser:appgroup /profile /blogs
40+ RUN mkdir -p /profile /blogs local_blogs local_profiles && \
41+ chown -R appuser:appgroup /profile /blogs local_blogs local_profiles
4242
4343# Copy the binary and health probe from builder stage
4444COPY --from=builder /app/storage-service .
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ import (
1919)
2020
2121func init () {
22- // Define the complete path including `/` and the folder name
23- folderPath := "/" + constant .ProfileDir
24- blogPath := "/" + constant .BlogDir
22+ // Define the complete path including the working directory and the folder name
23+ folderPath := constant .ProfileDir
24+ blogPath := constant .BlogDir
2525
2626 // Check if the directory already exists
2727 _ , err := os .Stat (folderPath )
You can’t perform that action at this time.
0 commit comments