Skip to content

Commit 2549308

Browse files
WIP: Needs to be tested
1 parent 3aef756 commit 2549308

5 files changed

+43
-8
lines changed

dockerfiles/Dockerfile-api Dockerfile-api

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ RUN npm install
1616
# copy project files
1717
COPY . .
1818

19-
EXPOSE 80 443
19+
EXPOSE 8080
2020
STOPSIGNAL SIGTERM
2121
CMD [ "node", "server.js" ]

Dockerfile-combined

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM node:14
2+
3+
# set environment variables
4+
ENV APP=/usr/src/app
5+
6+
# where the code lives
7+
WORKDIR $APP
8+
9+
# Install app dependencies
10+
# A wildcard is used to ensure both package.json AND package-lock.json are copied
11+
# where available (npm@5+)
12+
COPY package*.json ./
13+
14+
RUN npm install
15+
16+
# copy project files
17+
COPY . .
18+
19+
EXPOSE 8080
20+
STOPSIGNAL SIGTERM
21+
CMD [ "npm", "build" ]

Dockerfile-deploy.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
backend:
3+
env_file:
4+
'./.env'
5+
build:
6+
context: .
7+
dockerfile: ./Dockerfile-api
8+
image: ''
9+
ports:
10+
- '8080'
11+
frontend:
12+
build:
13+
context: .
14+
dockerfile: ./Dockerfile-ui
15+
image: ''
16+
ports:
17+
- '6002'

dockerfiles/Dockerfile-ui Dockerfile-ui

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ WORKDIR $APP
1111
# where available (npm@5+)
1212
COPY package*.json ./
1313

14+
COPY .env .
15+
1416
RUN npm install
1517

1618
# copy project
@@ -20,10 +22,7 @@ COPY . .
2022
# variables in place at build time so we make sure our workflow files take care of
2123
# populating this file with the correct values
2224

23-
# Copy environment file generated by CI (GitHub Actions)
24-
COPY .env .
25-
RUN npm run build
2625

27-
EXPOSE 3000
26+
EXPOSE 6002
2827
STOPSIGNAL SIGTERM
29-
CMD ["npm", "start"]
28+
CMD ["npm", "ui"]

dockerfiles/.dockerignore

-2
This file was deleted.

0 commit comments

Comments
 (0)