Skip to content

Commit

Permalink
[Feature] Store volumes in the project (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MelaineGerard authored Mar 27, 2024
2 parents 6718998 + 441100a commit 8c04478
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
13 changes: 13 additions & 0 deletions directus.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ddev-generated

FROM directus/directus:10.10.4

ARG uid
ARG gid

USER root
RUN apk --no-cache add shadow
RUN groupmod --gid $gid node
RUN usermod -u $uid -g $gid node

USER node
18 changes: 12 additions & 6 deletions docker-compose.directus.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# ddev-generated
#ddev-generated
services:
directus:
container_name: ddev-${DDEV_SITENAME}-directus
image: directus/directus:10.10.4
build:
context: .
dockerfile: ./directus.Dockerfile
args:
uid: $DDEV_UID
gid: $DDEV_GID
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
Expand All @@ -17,15 +22,16 @@ services:
- HTTPS_EXPOSE=8055:8055
- KEY=ddev-key
- SECRET=ddev-secret
- DB_CLIENT=sqlite3
- DB_FILENAME=/directus/database/data.db
volumes:
- ".:/mnt/ddev_config"
- "directus:/directus"
- "./directus/database:/directus/database:rw"
- "./directus/uploads:/directus/uploads:rw"
- "./directus/extensions:/directus/extensions:rw"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8055/server/health || exit 1
start_period: 15s
interval: 15s
timeout: 15s
retries: 3

volumes:
directus:
8 changes: 8 additions & 0 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ name: directus
pre_install_actions:
project_files:
- docker-compose.directus.yaml
- directus.Dockerfile
post_install_actions:
- |
#ddev-nodisplay
mkdir -p directus/database
mkdir -p directus/uploads
mkdir -p directus/extensions
printf "\ndirectus/\n" >> .gitignore
2 changes: 1 addition & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ teardown() {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
ddev delete -Oy ${PROJNAME} >/dev/null 2>&1
[ "${TESTDIR}" != "" ] && rm -rf ${TESTDIR}
[ "${TESTDIR}" != "" ] && sudo rm -rf ${TESTDIR}
}

@test "install from directory" {
Expand Down

0 comments on commit 8c04478

Please sign in to comment.