Skip to content
This repository was archived by the owner on Jun 10, 2021. It is now read-only.

Commit 0e8b7b0

Browse files
committed
Docker prod builds now can take environment varaibles
Docker prod builds now can take environment varaibles
1 parent ba74b10 commit 0e8b7b0

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ COPY --from=development --chown=root:root /srv/bt/node_modules ./node_modules
2121
COPY . .
2222

2323
ENV ENV prod
24-
RUN npm run env
25-
RUN npm run bundle
2624

2725
EXPOSE 8080
28-
CMD [ "npm", "run", "start" ]
26+
CMD [ "./bin/docker/run-docker.sh" ]

bin/docker/run-docker.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
npm run env
2+
npm run bundle
3+
npm run start

docker-compose.production.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ services:
44
bullettrain:
55
build:
66
context: .
7-
command: npm run start
87
environment:
98
- API_URL=http://localhost:8000/api/v1/
109
- ASSET_URL=http://localhost:8080/
1110
ports:
1211
- '8080:8080'
1312
volumes:
14-
- chat_node_modules:/srv/chat/node_modules
13+
- bt_node_modules:/srv/bt/node_modules
1514

1615
volumes:
17-
chat_node_modules:
16+
bt_node_modules:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
build:
66
context: .
77
target: development
8-
dockerfile: Dockerfile.dev
8+
dockerfile: Dockerfile
99
command: npm run dev
1010
environment:
1111
- API_URL=http://localhost:8000/api/v1/

0 commit comments

Comments
 (0)