Skip to content

Commit

Permalink
Added persistant storage for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Inventhrice committed Oct 24, 2024
1 parent 3614543 commit af416ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docker/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ DATA_DIR=/data
MEILI_ADDR=http://127.0.0.1:7700
MEILI_MASTER_KEY=[generate with <openssl rand -base64 36>]
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=[generate with <openssl rand -base64 36>]
NEXTAUTH_SECRET=[generate with <openssl rand -base64 36>]
DOCKER_DATA_DIR=[replace with the directory for persistent data]
11 changes: 4 additions & 7 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
build:
dockerfile: Dockerfile.dev
volumes:
- data:/data
- ${DOCKER_DATA_DIR}/data:/data
- ..:/app
ports:
- 3000:3000
Expand All @@ -30,12 +30,12 @@ services:
meilisearch:
image: getmeili/meilisearch:v1.6
volumes:
- meilisearch:/meili_data
- ${DOCKER_DATA_DIR}/meilisearch:/meili_data
workers:
build:
dockerfile: Dockerfile.dev
volumes:
- data:/data
- ${DOCKER_DATA_DIR}/data:/data
- ..:/app
working_dir: /app
environment:
Expand All @@ -56,13 +56,10 @@ services:
environment:
DATA_DIR: /data
volumes:
- data:/data
- ${DOCKER_DATA_DIR}/data:/data
- ..:/app
command:
- /bin/sh
- -c
- "pnpm install --frozen-lockfile && pnpm run db:migrate"

volumes:
meilisearch:
data:

0 comments on commit af416ca

Please sign in to comment.