File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ COPY --from=prerelease /usr/src/pylon/.pylon .pylon
4141COPY --from=prerelease /usr/src/pylon/package.json .
4242COPY --from=prerelease /usr/src/pylon/src src
4343COPY --from=prerelease /usr/src/pylon/tsconfig.json tsconfig.json
44+ COPY --from=prerelease /usr/src/pylon/migrations migrations
4445
4546# run the app
4647USER bun
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ export default class OutboxProcessor {
2121 await this . producer
2222 . connect ( )
2323 . then ( ( ) => console . log ( "Producer successfully connected" ) ) ;
24-
2524 const interval = this . intervalMs ;
2625
2726 const run = async ( ) => {
Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ const outbox_processor = new OutboxProcessor(
1515 1000
1616) ;
1717
18- await outbox_processor . start ( ) ;
18+ await outbox_processor . start ( ) ; // blocks until failure or completion
Original file line number Diff line number Diff line change @@ -25,12 +25,29 @@ services:
2525 - POSTGRES_PORT
2626 - JWT_SECRET
2727 - KAFKA_URL=kafka:9092
28- command : sh -c "sleep 5 && bun run outbox"
28+ command : bun run outbox
29+ restart : unless-stopped
2930 depends_on :
3031 - postgres
3132 - kafka
3233 networks :
3334 - mynet
35+
36+ init_db :
37+ build : ./backend
38+ environment :
39+ - POSTGRES_USER
40+ - POSTGRES_PASSWORD
41+ - POSTGRES_NAME
42+ - POSTGRES_HOST
43+ - POSTGRES_PORT
44+ - JWT_SECRET
45+ - KAFKA_URL=kafka:9092
46+ command : bun run init_db
47+ depends_on :
48+ - postgres
49+ networks :
50+ - mynet
3451 postgres :
3552 image : postgres:16
3653 container_name : postgres_db
@@ -137,21 +154,21 @@ services:
137154 networks :
138155 - mynet
139156
140- analytics_job :
141- build : ./analytics/
142- depends_on :
143- - jobmanager
144- - kafka
145- command : >
146- bash -c "
147- echo 'Waiting for JobManager...';
148- sleep 5;
149- /opt/flink/bin/flink run \
150- -m jobmanager:8081 \
151- /opt/flink/usrlib/*.jar
152- "
153- networks :
154- - mynet
157+ # analytics_job:
158+ # build: ./analytics/
159+ # depends_on:
160+ # - jobmanager
161+ # - kafka
162+ # command: >
163+ # bash -c "
164+ # echo 'Waiting for JobManager...';
165+ # sleep 5;
166+ # /opt/flink/bin/flink run \
167+ # -m jobmanager:8081 \
168+ # /opt/flink/usrlib/*.jar
169+ # "
170+ # networks:
171+ # - mynet
155172
156173volumes :
157174 postgres_data :
You can’t perform that action at this time.
0 commit comments