-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
87 lines (81 loc) · 2.2 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: "3"
services:
database:
image: postgis/postgis:13-master
# Required when running on platform other than amd64, like Apple M1/M2:
# platform: linux/amd64
volumes:
- ./data/database:/var/lib/postgresql/data
environment:
POSTGRES_USER_FILE: /run/secrets/db_user
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
POSTGRES_DB: "directus"
secrets:
- db_user
- db_password
cache:
image: redis:6
directus:
image: directus/directus:10.8.3
ports:
- 8055:8055
restart: always
volumes:
# Reuired only when using sqlite3
# - ./data/database:/directus/database
- ./data/uploads:/directus/uploads
- ./data/directus-snapshots:/directus/snapshots
- ./data/directus-extensions:/directus/extensions
depends_on:
- cache
- database
environment:
DB_CLIENT: "sqlite3"
# Reuired only when using sqlite3
# DB_FILENAME: "/directus/database/data.db"
DB_HOST: "database"
DB_PORT: "5432"
DB_DATABASE: "directus"
DB_USER_FILE: /run/secrets/db_user
DB_PASSWORD_FILE: /run/secrets/db_password
KEY: "sdfgasdkgfsdglfgdsakfgkjdsgfjlksdkj"
SECRET: "efkhkwehfkjhwekjhfkjwehfkjhewkfwek"
ADMIN_EMAIL_FILE: /run/secrets/directus_email
ADMIN_PASSWORD_FILE: /run/secrets/directus_password
WEBSOCKETS_ENABLED: true
CACHE_ENABLED: "true"
CACHE_STORE: "redis"
REDIS: "redis://cache:6379"
secrets:
- db_user
- db_password
- directus_email
- directus_password
nextjs:
container_name: nextjs
build:
context: .
dockerfile: dev.Dockerfile
# Set environment variables directly in the docker-compose file
# environment:
# ENV_VARIABLE: ${ENV_VARIABLE}
# NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
# Set envrionment variables based on the .env file
env_file:
- .env
volumes:
- ./src:/app/src
- ./public:/app/public
restart: always
ports:
- 3000:3000
- 6006:6006
secrets:
db_user:
file: db_user
db_password:
file: db_password
directus_email:
file: directus_email
directus_password:
file: directus_password