File tree Expand file tree Collapse file tree 4 files changed +33
-15
lines changed Expand file tree Collapse file tree 4 files changed +33
-15
lines changed Original file line number Diff line number Diff line change 1
1
ARG BASE_IMAGE
2
2
3
- FROM $BASE_IMAGE as base
3
+ FROM $BASE_IMAGE
4
4
5
5
WORKDIR /apps/database
6
6
7
- FROM base as dev
8
-
9
- CMD yarn dev
10
-
11
- FROM base as production_build
12
-
13
7
CMD yarn migrate
14
8
15
9
COPY apps/database/package.json apps/database/yarn.lock /apps/database/
Original file line number Diff line number Diff line change 1
1
ARG BASE_IMAGE=node:12.18.2-alpine3.11
2
2
3
- FROM $BASE_IMAGE as base
3
+ FROM $BASE_IMAGE
4
4
5
5
WORKDIR /app
6
6
@@ -16,6 +16,4 @@ RUN yarn install --production=true
16
16
17
17
COPY apps/graphql/src /app/src
18
18
19
- FROM base as dev
20
-
21
19
RUN yarn install
Original file line number Diff line number Diff line change @@ -4,10 +4,6 @@ FROM $BASE_IMAGE as base
4
4
5
5
WORKDIR /apps/worker
6
6
7
- FROM base as dev
8
-
9
- CMD yarn dev
10
-
11
7
FROM base as build
12
8
13
9
COPY apps/worker/package.json apps/worker/yarn.lock /apps/worker/
@@ -20,7 +16,7 @@ COPY apps/worker/src /apps/worker/src
20
16
21
17
RUN yarn build
22
18
23
- FROM base as production
19
+ FROM base as prod
24
20
25
21
CMD yarn start
26
22
Original file line number Diff line number Diff line change
1
+ version : " 3.7"
2
+
3
+ services :
4
+ migrations :
5
+ image : postgres-graphql/migrations
6
+ build :
7
+ context : .
8
+ dockerfile : ./apps/database/Dockerfile
9
+ args :
10
+ BASE_IMAGE : node:15.8.0-alpine3.12
11
+
12
+ gql :
13
+ image : postgres-graphql/graphql
14
+ build :
15
+ context : .
16
+ dockerfile : ./apps/graphql/Dockerfile
17
+ args :
18
+ BASE_IMAGE : node:15.8.0-alpine3.12
19
+
20
+ worker :
21
+ image : postgres-graphql/worker
22
+ build :
23
+ context : .
24
+ dockerfile : ./apps/worker/Dockerfile
25
+ target : prod
26
+ args :
27
+ BASE_IMAGE : node:15.8.0-alpine3.12
28
+
29
+ volumes :
30
+ pg_data :
You can’t perform that action at this time.
0 commit comments