@@ -18,15 +18,15 @@ services:
1818 ports :
1919 - " 5432:5432"
2020 volumes :
21- - pgdata:/var/lib/postgresql/data
21+ - pgdata:/var/lib/postgresql
2222 healthcheck :
2323 test : ["CMD-SHELL", "pg_isready -U postgres"]
2424 interval : 5s
2525 timeout : 5s
2626 retries : 5
2727
2828 db-setup :
29- image : ghcr.io/constructive-io/constructive:latest
29+ image : ghcr.io/constructive-io/constructive-db-job :latest
3030 depends_on :
3131 postgres :
3232 condition : service_healthy
@@ -36,36 +36,45 @@ services:
3636 PGUSER : postgres
3737 PGPASSWORD : ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set (see .env.example)}
3838 PGDATABASE : constructive
39+ CONSTRUCTIVE_DOMAIN : " localhost"
3940 entrypoint : ["bash", "-c"]
4041 command :
4142 - |
43+ set -eo pipefail
4244 cd /app
45+
4346 echo "Creating database $$PGDATABASE"
4447 createdb -h "$$PGHOST" -U "$$PGUSER" "$$PGDATABASE" || true
4548
4649 echo "Applying bootstrap roles"
4750 pgpm admin-users bootstrap --yes
4851 pgpm admin-users add --test --yes
4952
50- echo "Deploying packages"
51- pgpm deploy --yes --database "$$PGDATABASE" --package constructive
52- pgpm deploy --yes --database "$$PGDATABASE" --package constructive-services
53- pgpm deploy --yes --database "$$PGDATABASE" --package constructive-prod
53+ echo "Deploying constructive-local (services + database record)"
54+ pgpm deploy --yes --database "$$PGDATABASE" --package constructive-local
5455
55- echo "Deploying metaschema and jobs "
56+ echo "Deploying metaschema"
5657 pgpm deploy --yes --database "$$PGDATABASE" --package metaschema
58+
59+ echo "Deploying pgpm-database-jobs"
5760 pgpm deploy --yes --database "$$PGDATABASE" --package pgpm-database-jobs
5861
5962 echo "Done"
6063
6164 graphql-server :
6265 image : ghcr.io/constructive-io/constructive:latest
66+ pull_policy : always
6367 depends_on :
6468 db-setup :
6569 condition : service_completed_successfully
66- entrypoint : ["constructive", "server", "--host", "0.0.0.0", "--port", "3000", "--origin", "*"]
70+ extra_hosts :
71+ - " host.docker.internal:host-gateway"
72+ - " localhost:host-gateway"
73+ entrypoint : ["cnc", "server", "--host", "0.0.0.0", "--port", "3000", "--origin", "*", "--strictAuth", "false"]
6774 environment :
6875 NODE_ENV : development
76+ LOG_LEVEL : debug
77+ DEBUG : " graphile*"
6978 PORT : " 3000"
7079 SERVER_HOST : " 0.0.0.0"
7180 SERVER_TRUST_PROXY : " true"
@@ -78,12 +87,20 @@ services:
7887 PGPASSWORD : ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD must be set (see .env.example)}
7988 PGDATABASE : constructive
8089 # API configuration — header-based routing (X-Api-Name, X-Database-Id)
90+ API_ENABLE_META : " true"
8191 API_ENABLE_SERVICES : " true"
82- API_EXPOSED_SCHEMAS : " metaschema_public,services_public,constructive_auth_public"
83- API_IS_PUBLIC : " false"
84- API_META_SCHEMAS : " metaschema_public,services_public,metaschema_modules_public,constructive_auth_public"
92+ API_ENABLE_TENANT : " true"
93+ API_EXPOSED_SCHEMAS : " collections_public,meta_public,storage_public,app_public"
8594 API_ANON_ROLE : " administrator"
8695 API_ROLE_NAME : " administrator"
96+ API_DEFAULT_DATABASE_ID : " constructive"
97+ # S3/MinIO configuration (extra_hosts makes localhost work from inside container)
98+ CDN_ENDPOINT : " http://localhost:9000"
99+ BUCKET_NAME : " test-bucket"
100+ BUCKET_PROVIDER : " minio"
101+ AWS_REGION : " us-east-1"
102+ AWS_ACCESS_KEY : " minioadmin"
103+ AWS_SECRET_KEY : " minioadmin"
87104 ports :
88105 - " 3002:3000"
89106
@@ -93,5 +110,25 @@ services:
93110 - " 1025:1025" # SMTP
94111 - " 8025:8025" # Web UI
95112
113+ minio :
114+ image : quay.io/minio/minio:latest
115+ environment :
116+ MINIO_ROOT_USER : minioadmin
117+ MINIO_ROOT_PASSWORD : minioadmin
118+ # Enable CORS for browser uploads
119+ MINIO_API_CORS_ALLOW_ORIGIN : " *"
120+ ports :
121+ - " 9000:9000" # API
122+ - " 9001:9001" # Console
123+ volumes :
124+ - minio-data:/data
125+ command : server /data --console-address ":9001"
126+ healthcheck :
127+ test : ["CMD", "mc", "ready", "local"]
128+ interval : 5s
129+ timeout : 5s
130+ retries : 5
131+
96132volumes :
97133 pgdata :
134+ minio-data :
0 commit comments