Skip to content

Commit

Permalink
fix: seed file
Browse files Browse the repository at this point in the history
  • Loading branch information
skorekm committed Jul 22, 2024
1 parent ba238c6 commit d3535a3
Show file tree
Hide file tree
Showing 2 changed files with 250 additions and 133 deletions.
224 changes: 112 additions & 112 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
volumes:
postgres-data:
# postgres-data:
db-config:

services:
Expand All @@ -9,14 +9,14 @@ services:
depends_on:
frontend:
condition: service_healthy
api-server:
condition: service_healthy
# api-server:
# condition: service_healthy
kong:
condition: service_healthy
ports:
- "8080:80"
environment:
- UPSTREAMS=/cpf/api:api-server:8001,/cpf:frontend:3000,/:kong:8000
- UPSTREAMS=/cpf:frontend:3000,/:kong:8000
- WEBSOCKETS=true
- HEALTHCHECK=/health
- HEALTHCHECK_PORT=8888
Expand Down Expand Up @@ -46,59 +46,59 @@ services:
timeout: 5s
retries: 5

api-server:
image: cpf/backend-image
restart: unless-stopped
build:
context: ./backend
target: dev
command: api-server-dev
env_file:
- .env
ports:
- "8001:8001"
volumes:
- ./backend/src:/src
stdin_open: true
tty: true
depends_on:
data-loader:
condition: service_completed_successfully
healthcheck:
test: wget -q -O /dev/null http://api-server:8001/cpf/api/health
interval: 5s
timeout: 5s
retries: 5
# api-server:
# image: cpf/backend-image
# restart: unless-stopped
# build:
# context: ./backend
# target: dev
# command: api-server-dev
# env_file:
# - .env
# ports:
# - "8001:8001"
# volumes:
# - ./backend/src:/src
# stdin_open: true
# tty: true
# depends_on:
# data-loader:
# condition: service_completed_successfully
# healthcheck:
# test: wget -q -O /dev/null http://api-server:8001/cpf/api/health
# interval: 5s
# timeout: 5s
# retries: 5

data-loader:
image: cpf/backend-image
restart: "no"
build:
context: ./backend
target: dev
command: data-loader
env_file:
- .env
volumes:
- ./backend/src:/src
stdin_open: true
tty: true
# data-loader:
# image: cpf/backend-image
# restart: "no"
# build:
# context: ./backend
# target: dev
# command: data-loader
# env_file:
# - .env
# volumes:
# - ./backend/src:/src
# stdin_open: true
# tty: true

postgres:
build:
context: ./backend/postgres
restart: unless-stopped
env_file:
- .env
healthcheck:
test: pg_isready -U ${POSTGRES_USER} -d postgres
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data/
# postgres:
# build:
# context: ./backend/postgres
# restart: unless-stopped
# env_file:
# - .env
# healthcheck:
# test: pg_isready -U ${POSTGRES_USER} -d postgres
# interval: 5s
# timeout: 5s
# retries: 5
# ports:
# - "5432:5432"
# volumes:
# - postgres-data:/var/lib/postgresql/data/


studio:
Expand Down Expand Up @@ -303,64 +303,64 @@ services:
# SEED_SELF_HOST: true

# To use S3 backed storage: docker compose -f docker-compose.yml -f docker-compose.s3.yml up
storage:
container_name: supabase-storage
image: supabase/storage-api:v1.0.6
depends_on:
db:
# Disable this if you are using an external Postgres database
condition: service_healthy
rest:
condition: service_started
imgproxy:
condition: service_started
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:5000/status"
]
timeout: 5s
interval: 5s
retries: 3
restart: unless-stopped
environment:
ANON_KEY: ${ANON_KEY}
SERVICE_KEY: ${SERVICE_ROLE_KEY}
POSTGREST_URL: http://rest:3001
PGRST_JWT_SECRET: ${JWT_SECRET}
DATABASE_URL: postgres://supabase_storage_admin:${SUPABASE_POSTGRES_PASSWORD}@${SUPABASE_POSTGRES_HOST}:${SUPABASE_POSTGRES_PORT}/${SUPABASE_POSTGRES_DB}
FILE_SIZE_LIMIT: 52428800
STORAGE_BACKEND: file
FILE_STORAGE_BACKEND_PATH: /var/lib/storage
TENANT_ID: stub
# TODO: https://github.com/supabase/storage-api/issues/55
REGION: stub
GLOBAL_S3_BUCKET: stub
ENABLE_IMAGE_TRANSFORMATION: "true"
IMGPROXY_URL: http://imgproxy:5001
volumes:
- ./supabase/docker/volumes/storage:/var/lib/storage:z
# storage:
# container_name: supabase-storage
# image: supabase/storage-api:v1.0.6
# depends_on:
# db:
# # Disable this if you are using an external Postgres database
# condition: service_healthy
# rest:
# condition: service_started
# imgproxy:
# condition: service_started
# healthcheck:
# test:
# [
# "CMD",
# "wget",
# "--no-verbose",
# "--tries=1",
# "--spider",
# "http://localhost:5000/status"
# ]
# timeout: 5s
# interval: 5s
# retries: 3
# restart: unless-stopped
# environment:
# ANON_KEY: ${ANON_KEY}
# SERVICE_KEY: ${SERVICE_ROLE_KEY}
# POSTGREST_URL: http://rest:3001
# PGRST_JWT_SECRET: ${JWT_SECRET}
# DATABASE_URL: postgres://supabase_storage_admin:${SUPABASE_POSTGRES_PASSWORD}@${SUPABASE_POSTGRES_HOST}:${SUPABASE_POSTGRES_PORT}/${SUPABASE_POSTGRES_DB}
# FILE_SIZE_LIMIT: 52428800
# STORAGE_BACKEND: file
# FILE_STORAGE_BACKEND_PATH: /var/lib/storage
# TENANT_ID: stub
# # TODO: https://github.com/supabase/storage-api/issues/55
# REGION: stub
# GLOBAL_S3_BUCKET: stub
# ENABLE_IMAGE_TRANSFORMATION: "true"
# IMGPROXY_URL: http://imgproxy:5001
# volumes:
# - ./supabase/docker/volumes/storage:/var/lib/storage:z

imgproxy:
container_name: supabase-imgproxy
image: darthsim/imgproxy:v3.8.0
healthcheck:
test: [ "CMD", "imgproxy", "health" ]
timeout: 5s
interval: 5s
retries: 3
environment:
IMGPROXY_BIND: ":5001"
IMGPROXY_LOCAL_FILESYSTEM_ROOT: /
IMGPROXY_USE_ETAG: "true"
IMGPROXY_ENABLE_WEBP_DETECTION: ${IMGPROXY_ENABLE_WEBP_DETECTION}
volumes:
- ./supabase/storage/volumes/storage:/var/lib/storage:z
# imgproxy:
# container_name: supabase-imgproxy
# image: darthsim/imgproxy:v3.8.0
# healthcheck:
# test: [ "CMD", "imgproxy", "health" ]
# timeout: 5s
# interval: 5s
# retries: 3
# environment:
# IMGPROXY_BIND: ":5001"
# IMGPROXY_LOCAL_FILESYSTEM_ROOT: /
# IMGPROXY_USE_ETAG: "true"
# IMGPROXY_ENABLE_WEBP_DETECTION: ${IMGPROXY_ENABLE_WEBP_DETECTION}
# volumes:
# - ./supabase/storage/volumes/storage:/var/lib/storage:z

meta:
container_name: supabase-meta
Expand Down
Loading

0 comments on commit d3535a3

Please sign in to comment.