diff --git a/docker/.env.sample b/docker/.env.sample index 0b1471a0..5d720e28 100644 --- a/docker/.env.sample +++ b/docker/.env.sample @@ -3,4 +3,5 @@ DATA_DIR=/data MEILI_ADDR=http://127.0.0.1:7700 MEILI_MASTER_KEY=[generate with ] NEXTAUTH_URL=http://localhost:3000 -NEXTAUTH_SECRET=[generate with ] \ No newline at end of file +NEXTAUTH_SECRET=[generate with ] +DOCKER_DATA_DIR=[replace with the directory for persistent data] diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 95883ce5..c94b4812 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -4,7 +4,7 @@ services: build: dockerfile: Dockerfile.dev volumes: - - data:/data + - ${DOCKER_DATA_DIR}/data:/data - ..:/app ports: - 3000:3000 @@ -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: @@ -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: