File tree 6 files changed +14365
-433
lines changed
6 files changed +14365
-433
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,15 @@ WORKDIR /usr/src/app
48
48
# copy from build image
49
49
COPY --from=development /usr/src/app/dist ./dist
50
50
COPY --from=development /usr/src/app/node_modules ./node_modules
51
- COPY --from=development /usr/src/app/entrypoints ./
51
+
52
+ # required for migrations
53
+ COPY libs/orm-migrations/ libs/orm-migrations/
54
+ COPY ormconfig.js ./
55
+
56
+ # required for run
57
+ COPY entrypoints/ ./
58
+ COPY package.json ./
59
+ COPY tsconfig.json ./
52
60
53
61
EXPOSE 3000
54
62
Original file line number Diff line number Diff line change @@ -69,6 +69,25 @@ services:
69
69
- 8000:8000
70
70
command : " -jar DynamoDBLocal.jar -sharedDb -dbPath /home/dynamodblocal/data/"
71
71
72
+ # api:
73
+ # networks:
74
+ # - postgres
75
+ # - redis
76
+ # env_file:
77
+ # - .env.local
78
+ # environment:
79
+ # - NEST_APP_TYPE=api
80
+ # - DATABASE_HOST=postgres
81
+ # - DATABASE_PORT=5432
82
+ # - REDIS_CACHE_URL=redis://@redis:6379/0
83
+ # - REDIS_SOCKET_URL=redis://@redis:6379/1
84
+ # - REDIS_EVENT_URL=redis://@redis:6379/2
85
+ # - REDIS_CONNECTION_STRING=redis://@redis:6379/4
86
+ # build:
87
+ # context: .
88
+ # args:
89
+ # - APP_NAME=api
90
+
72
91
# TODO: Add opensearch docker containers (current containers are not working)
73
92
# opensearch-node1:
74
93
# image: opensearchproject/opensearch:latest
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
- if [ " $NEST_APP_TYPE " == " aggregator-dao" ]
4
- then
5
- node dist/apps/aggregator-dao/main.js
6
- elif [ " $NEST_APP_TYPE " == " aggregator" ]
7
- then
8
- node dist/apps/aggregator/main.js
9
- elif [ $NEST_APP_TYPE == " notifier" ]
10
- then
11
- node dist/apps/notifier/main.js
12
- elif [ $NEST_APP_TYPE == " draft" ]
13
- then
14
- node dist/apps/draft/main.js
15
- elif [ $NEST_APP_TYPE == " indexer-processor" ]
16
- then
17
- node dist/apps/indexer-processor/main.js
18
- else
19
- node dist/apps/api/main.js
20
- fi
3
+ # exit when any command fails
4
+ set -e
5
+
6
+ # run migrations
7
+ npm run migration:run
8
+
9
+ # run app
10
+ node dist/apps/$NEST_APP_TYPE /main.js
You can’t perform that action at this time.
0 commit comments