Skip to content

Commit 4b599df

Browse files
chore(docker): fix dockerfiles, add root dockerignore and alter gitignore
1 parent e9d13d4 commit 4b599df

5 files changed

Lines changed: 17 additions & 20 deletions

File tree

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
.git
21
node_modules
2+
.git
33
config.json
4-
certs
5-
src/logs
4+
logs/

.gitignore

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
node_modules
1+
node_modules/
22
.env
3-
certs
4-
logs
5-
dist
3+
logs/
4+
dist/
65
newman
76
config.json
8-
uploads
7+
uploads/

apps/miiverse-api/.dockerignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

juxtaposition-ui.Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@
22

33
ARG app_dir="/home/node/app"
44

5-
FROM node:20-alpine
5+
FROM node:22-alpine
66
ARG app_dir
77
WORKDIR ${app_dir}
88

99
COPY . .
10-
1110
RUN npm ci
12-
RUN mkdir -p ${app_dir}/uploads && chown node:node ${app_dir}/uploads
11+
12+
WORKDIR ${app_dir}/apps/juxtaposition-ui
13+
14+
RUN mkdir -p uploads && chown node:node uploads
15+
RUN npm run build
1316

1417
ENV NODE_ENV=production
1518
USER node
1619

17-
WORKDIR ${app_dir}/apps/juxtaposition-ui
1820
CMD ["npm", "run", "start"]

miiverse-api.Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
ARG app_dir="/home/node/app"
44

5-
FROM node:20-alpine
5+
FROM node:22-alpine
66
ARG app_dir
77
WORKDIR ${app_dir}
88

99
COPY . .
10-
1110
RUN npm ci
1211

12+
WORKDIR ${app_dir}/apps/miiverse-api
13+
14+
RUN npm run build
15+
1316
ENV NODE_ENV=production
1417
USER node
1518

16-
WORKDIR ${app_dir}/apps/miiverse-api
1719
CMD ["npm", "run", "start"]

0 commit comments

Comments
 (0)