-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
126 lines (112 loc) · 2.82 KB
/
docker-compose.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
version: "3"
services:
# Postgres
database:
container_name: database
image: postgres:13.5
volumes:
- ./database:/var/lib/postgresql/data
networks:
- dna_network
environment:
POSTGRES_USER: "directus"
POSTGRES_PASSWORD: "directus"
POSTGRES_DB: "directus"
cache:
container_name: cache
image: redis:6
networks:
- dna_network
# Directus
directus:
container_name: directus
image: directus/directus:latest
ports:
- ${DIRECTUS_PORT}:${DIRECTUS_PORT}
volumes:
- ./directus/uploads:/directus/uploads
- ./directus/migrations:/directus/migrations
command:
- /bin/sh
- -c
- |
npx directus bootstrap
npx directus start
networks:
dna_network:
ipv4_address: ${DOCKER_DNA_IPV4_DIRECTUS}
depends_on:
- cache
- database
environment:
KEY: ${DIRECTUS_KEY}
SECRET: ${DIRECTUS_SECRET}
PUBLIC_URL: "http://localhost:8055"
DB_CLIENT: "pg"
DB_HOST: "database"
DB_PORT: "5432"
DB_DATABASE: "directus"
DB_USER: "directus"
DB_PASSWORD: "directus"
REDIS: ${REDIS}
ADMIN_EMAIL: ${DIRECTUS_ADMIN_EMAIL}
ADMIN_PASSWORD: ${DIRECTUS_ADMIN_PASSWORD}
STORAGE_LOCATIONS: "s3"
STORAGE_S3_DRIVER: "s3"
STORAGE_S3_KEY: ${STORAGE_S3_KEY}
STORAGE_S3_SECRET: ${STORAGE_S3_SECRET}
STORAGE_S3_BUCKET: ${STORAGE_S3_BUCKET}
STORAGE_S3_REGION: ${STORAGE_S3_REGION}
ACCESS_TOKEN_TTL: 1d
CORS_ENABLED: "true"
AUTH_PROVIDERS: "google"
AUTH_GOOGLE_DRIVER: "openid"
AUTH_GOOGLE_ISSUER_URL: "https://accounts.google.com"
AUTH_GOOGLE_IDENTIFIER_KEY: "email"
AUTH_GOOGLE_ICON: "google"
AUTH_GOOGLE_LABEL: "Google"
AUTH_GOOGLE_ALLOW_PUBLIC_REGISTRATION: "true"
AUTH_GOOGLE_CLIENT_ID: ${AUTH_GOOGLE_CLIENT_ID}
AUTH_GOOGLE_CLIENT_SECRET: ${AUTH_GOOGLE_CLIENT_SECRET}
AUTH_GOOGLE_DEFAULT_ROLE_ID: ${AUTH_GOOGLE_DEFAULT_ROLE_ID}
REFRESH_TOKEN_COOKIE_DOMAIN: ${REFRESH_TOKEN_COOKIE_DOMAIN}
REFRESH_TOKEN_COOKIE_SECURE: "true"
REFRESH_TOKEN_COOKIE_SAME_SITE: "None"
# NestJS
nest:
container_name: nest
build:
context: ./nestjs
target: development
command: npm run start:dev
volumes:
- ./nestjs:/usr/src/app
- /usr/src/app/node_modules/
ports:
- ${NEST_PORT}:${NEST_PORT}
env_file:
- .env
networks:
- dna_network
depends_on:
- database
- cache
- directus
# Nginx
nginx:
build:
context: ./nginx
container_name: nginx
hostname: nginx
ports:
- "80:80"
depends_on:
- nest
networks:
- dna_network
networks:
dna_network:
ipam:
driver: default
config:
- subnet: ${DOCKER_DNA_IPV4_RANGE}