-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
141 lines (132 loc) · 4.1 KB
/
compose.yml
File metadata and controls
141 lines (132 loc) · 4.1 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
services:
# Application Next.js
app:
build: .
restart: unless-stopped
environment:
- NODE_ENV=production
- PORT=3000
env_file:
- .env
ports:
- "3000:3000"
networks:
- eduroots
depends_on:
- postgres
- auth
- rest
- studio
# Base de données PostgreSQL
postgres:
image: postgres:17-alpine
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB:-eduroots}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/supabase/migrations:/docker-entrypoint-initdb.d
networks:
- eduroots
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 30s
timeout: 10s
retries: 3
# Supabase Auth
auth:
image: supabase/gotrue:v2.177.0
restart: unless-stopped
env_file:
- .env
environment:
GOTRUE_API_HOST: 0.0.0.0
GOTRUE_API_PORT: 9999
GOTRUE_DB_DRIVER: postgres
GOTRUE_DB_DATABASE_URL: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-eduroots}?sslmode=disable
GOTRUE_SITE_URL: ${SITE_URL:-http://localhost:3000}
GOTRUE_API_EXTERNAL_URL: http://localhost:3000
API_EXTERNAL_URL: http://localhost:3000
GOTRUE_JWT_SECRET: ${JWT_SECRET:-your-super-secret-jwt-token-with-at-least-32-characters-long}
GOTRUE_LOG_LEVEL: debug
GOTRUE_JWT_EXP: 3600
GOTRUE_EXTERNAL_GOOGLE_ENABLED: true
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
GOTRUE_EXTERNAL_GOOGLE_SECRET: ${GOOGLE_CLIENT_SECRET}
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI: ${SITE_URL:-http://localhost:3000}/auth/google-auth
networks:
- eduroots
depends_on:
postgres:
condition: service_healthy
# Supabase REST API
rest:
image: postgrest/postgrest:v13.0.4
restart: unless-stopped
env_file:
- .env
environment:
PGRST_DB_URI: postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-eduroots}
PGRST_DB_SCHEMAS: public,education,logs,stats,config
PGRST_DB_ANON_ROLE: anon
PGRST_SERVER_PORT: 3001
PGRST_SERVER_HOST: 0.0.0.0
# PGRST_JWT_SECRET: ${JWT_SECRET} # Temporairement désactivé pour Studio
PGRST_DEFAULT_RLS: "0" # Désactiver RLS temporairement
ports:
- "3001:3001"
networks:
- eduroots
depends_on:
postgres:
condition: service_healthy
# Supabase Meta - Service pour les métadonnées PostgreSQL
meta:
image: supabase/postgres-meta:v0.91.0
restart: unless-stopped
env_file:
- .env
environment:
PG_META_PORT: 8080
PG_META_DB_HOST: postgres
PG_META_DB_PORT: 5432
PG_META_DB_NAME: ${POSTGRES_DB:-eduroots}
PG_META_DB_USER: ${POSTGRES_USER:-postgres}
PG_META_DB_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
networks:
- eduroots
depends_on:
postgres:
condition: service_healthy
# Supabase Studio (Interface Web d'administration)
studio:
image: supabase/studio:latest
restart: unless-stopped
env_file:
- .env
environment:
STUDIO_PG_META_URL: http://meta:8080
DEFAULT_ORGANIZATION_NAME: ${INSTANCE_NAME:-eduroots}
DEFAULT_PROJECT_NAME: ${INSTANCE_NAME:-eduroots}
STUDIO_PORT: 3000
SUPABASE_PUBLIC_URL: https://${DOMAIN:-localhost}
SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_SERVICE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
ports:
- "8080:3000"
networks:
- eduroots
depends_on:
postgres:
condition: service_healthy
meta:
condition: service_started
networks:
eduroots:
driver: bridge
volumes:
postgres_data: