roles: refactor roles to start a docker container with directus and psotgresql database, add text-editor tool
This commit is contained in:
parent
e17f194745
commit
7bdbf243f2
16 changed files with 249 additions and 157 deletions
24
roles/directus/files/.env.example
Normal file
24
roles/directus/files/.env.example
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
# database
|
||||
POSTGRES_USER="database_user" # This variable needs to be specified here.
|
||||
POSTGRES_PASSWORD="database_password"
|
||||
POSTGRES_DB="database_name"
|
||||
|
||||
# directus
|
||||
SECRET="<create with 'openssl rand -hex 32'>"
|
||||
DB_CLIENT="pg"
|
||||
DB_HOST="database"
|
||||
DB_PORT="5432"
|
||||
DB_DATABASE="database_name"
|
||||
DB_USER="database_user"
|
||||
DB_PASSWORD="database_password"
|
||||
ADMIN_EMAIL="directus_login_mail"
|
||||
ADMIN_PASSWORD="directus_login_password"
|
||||
CACHE_ENABLED="true"
|
||||
CACHE_AUTO_PURGE="true"
|
||||
CACHE_STORE="redis"
|
||||
REDIS="redis://cache:6379"
|
||||
|
||||
# pgadmin4
|
||||
# PGADMIN_DEFAULT_EMAIL="pgadmin4_login_mail"
|
||||
# PGADMIN_DEFAULT_PASSWORD="pgadmin4_login_password"
|
||||
52
roles/directus/files/docker-compose.yml
Normal file
52
roles/directus/files/docker-compose.yml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
services:
|
||||
database:
|
||||
env_file: .env
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "--host=localhost", "--username=${POSTGRES_USER}", "--dbname=${POSTGRES_DB}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_interval: 5s
|
||||
start_period: 30s
|
||||
image: postgis/postgis:13-master
|
||||
# platform: linux/amd64 # Required when running on platform other than amd64, like Apple M1/M2:
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
|
||||
# pgadmin4:
|
||||
# container_name: pgadmin4
|
||||
# depends_on:
|
||||
# - database
|
||||
# env_file: .env
|
||||
# image: docker.io/dpage/pgadmin4:8.14
|
||||
# ports:
|
||||
# - 5050:80
|
||||
# restart: unless-stopped
|
||||
|
||||
cache:
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "[ $$(redis-cli ping) = 'PONG' ]"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_interval: 5s
|
||||
start_period: 30s
|
||||
image: redis:6
|
||||
|
||||
directus:
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
cache:
|
||||
condition: service_healthy
|
||||
env_file: .env
|
||||
image: directus/directus:11.5.1
|
||||
ports:
|
||||
- 8055:8055
|
||||
volumes:
|
||||
- ./uploads:/directus/uploads
|
||||
- ./extensions:/directus/extensions
|
||||
|
||||
volumes:
|
||||
db:
|
||||
Loading…
Add table
Add a link
Reference in a new issue