Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Commit

Permalink
Revert "chore: use docker compose watch for local dev (#1717)"
Browse files Browse the repository at this point in the history
This reverts commit e3ed258.
  • Loading branch information
asdfryan authored Oct 12, 2023
1 parent e3ed258 commit 7e30407
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 64 deletions.
20 changes: 0 additions & 20 deletions Dockerfile.dev

This file was deleted.

2 changes: 1 addition & 1 deletion apps/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ createTerminus(server, {
return;
},
},
timeout: process.env.ENVIRONMENT === 'development' ? 0 : 10000,
timeout: 10000,
beforeShutdown: async () => {
logger.info('Server is shutting down');
metricsServer.close();
Expand Down
1 change: 0 additions & 1 deletion depot.json

This file was deleted.

53 changes: 11 additions & 42 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,72 +45,40 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-supaglue}

api:
build:
context: .
dockerfile: ./Dockerfile.dev
args:
- APP=api
image: node:18-bullseye
ports:
- '8080:8080'
depends_on:
postgres:
condition: service_started
init:
condition: service_completed_successfully
working_dir: /workspace
develop:
watch:
- action: sync
path: ./apps/api
target: /workspace/apps/api
ignore:
- node_modules/
- action: sync
path: ./packages
target: /workspace/packages
- action: rebuild
path: package.json
- action: rebuild
path: ./apps/api/package.json
volumes:
- .:/app
working_dir: /app
environment:
<<: [*common-env, *fe-api-common-env]
SUPAGLUE_API_PORT: ${SUPAGLUE_API_PORT:-8080}
SUPAGLUE_CORS_ORIGIN: ${SUPAGLUE_CORS_ORIGIN:-http://localhost:3000}
SUPAGLUE_SYNC_PERIOD_MS:
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-admin}
restart: on-failure
command: /bin/sh -c "yarn workspace api start"
command: /bin/sh -c "./apps/api/scripts/start_dev.sh"

sync-worker:
build:
context: .
dockerfile: ./Dockerfile.dev
args:
- APP=sync-worker
image: node:18-bullseye
depends_on:
postgres:
condition: service_started
init:
condition: service_completed_successfully
working_dir: /workspace
develop:
watch:
- action: sync
path: ./apps/sync-worker
target: /workspace/apps/sync-worker
ignore:
- node_modules/
- action: sync
path: ./packages
target: /workspace/packages
- action: rebuild
path: package.json
- action: rebuild
path: ./apps/sync-worker/package.json
volumes:
- .:/app
working_dir: /app
environment:
<<: *common-env
restart: on-failure
command: /bin/sh -c "yarn workspace sync-worker start"
command: /bin/sh -c "./apps/sync-worker/scripts/start_dev.sh"

temporal:
image: alpine:3.18.0
Expand Down Expand Up @@ -141,6 +109,7 @@ services:
- sh
- -c
- |
yarn install
yarn workspace @supaglue/db prisma migrate dev
yarn workspace @supaglue/db prisma db seed
yarn workspace api init-temporal
Expand Down

0 comments on commit 7e30407

Please sign in to comment.