-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #541 from navikt/express-server
Bytt ut nginx med express
- Loading branch information
Showing
32 changed files
with
13,202 additions
and
2,399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules/ | ||
server/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NODE_ENV=development | ||
SU_SE_BAKOVER_URL=http://localhost:8080 | ||
AMPLITUDE_API_KEY=x | ||
FEATURE_HENDELSESLOGG=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ node_modules | |
.cache | ||
.parcel_cache | ||
dist | ||
server/dist | ||
.idea/ | ||
.eslintcache | ||
.DS_STORE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
FROM openresty/openresty:centos | ||
FROM navikt/node-express:12.2.0-alpine | ||
|
||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY nginx.conf /etc/nginx/conf.d/nais.conf | ||
COPY nginx.app.conf /etc/nginx/conf.d/app.conf | ||
COPY dist/* /app/www/ | ||
ENV NODE_ENV production | ||
ENV BASE_DIR /app | ||
ENV FRONTEND_DIR ${BASE_DIR}/frontend | ||
ENV BACKEND_DIR ${BASE_DIR}/server | ||
ENV PORT 80 | ||
|
||
COPY docker-entrypoint.sh / | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
CMD ["nginx", "-g", "daemon off;"] | ||
RUN mkdir -p ${BASE_DIR} | ||
|
||
COPY dist ${FRONTEND_DIR} | ||
COPY server ${BACKEND_DIR} | ||
# Trengs av server-bygget | ||
COPY tsconfig.json ${BASE_DIR}/ | ||
|
||
WORKDIR ${BACKEND_DIR} | ||
RUN npm ci | ||
RUN npm run build | ||
|
||
EXPOSE ${PORT} | ||
|
||
ENTRYPOINT [ "sh", "-c" ] | ||
CMD ["NODE_ENV=production npm start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"watch": ["server"], | ||
"exec": "ts-node --project ./server/tsconfig.json server/index.ts", | ||
"ext": "ts" | ||
} |
Oops, something went wrong.