diff --git a/Dockerfile b/Dockerfile index cdd495c..8c47722 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,17 @@ -FROM node:8.9.4 +FROM node:lts-alpine # Update everything on the box -RUN apt-get -y update -RUN apt-get clean +RUN apk update # Set the working directory -WORKDIR /srv/src +WORKDIR /srv # Copy our package.json & install our dependencies -COPY package.json /srv/src/package.json -RUN yarn install +COPY package.json /srv/package.json +RUN npm install --production # Copy the remaining application code -COPY . /srv/src +COPY . /srv/ # Start the app -CMD yarn start +CMD npm start diff --git a/package.json b/package.json index f70d103..1cb7080 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ ] }, "dependencies": { - "@asymmetrik/node-fhir-server-core": "git+https://github.com/Asymmetrik/node-fhir-server-core.git", + "@asymmetrik/node-fhir-server-core": "^1.4.0", "jsonwebtoken": "^8.1.0", "moment-timezone": "^0.5.14", "var": "^0.3.2" diff --git a/src/config.js b/src/config.js index 718466a..38c63d0 100644 --- a/src/config.js +++ b/src/config.js @@ -18,7 +18,7 @@ let whitelist = whitelist_env && whitelist_env.length === 1 let fhirServerConfig = { auth: { // This servers URI - resourceServer: env.RESOURCE_SERVER, + resourceServer: env.RESOURCE_SERVER || 'http://localhost:3000', // // if you use this strategy, you need to add the corresponding env vars to docker-compose // @@ -30,7 +30,7 @@ let fhirServerConfig = { }, server: { // support various ENV that uses PORT vs SERVER_PORT - port: env.PORT || env.SERVER_PORT, + port: env.PORT || env.SERVER_PORT || 3000, // allow Access-Control-Allow-Origin corsOptions: { maxAge: 86400, @@ -38,23 +38,23 @@ let fhirServerConfig = { } }, logging: { - level: env.LOGGING_LEVEL + level: env.LOGGING_LEVEL || 'warn' }, // // If you want to set up conformance statement with security enabled // Uncomment the following block // - security: [ - { - url: 'authorize', - valueUri: `${env.AUTH_SERVER_URI}/authorize` - }, - { - url: 'token', - valueUri: `${env.AUTH_SERVER_URI}/token` - } - // optional - registration - ], + // security: [ + // { + // url: 'authorize', + // valueUri: `${env.AUTH_SERVER_URI}/authorize` + // }, + // { + // url: 'token', + // valueUri: `${env.AUTH_SERVER_URI}/token` + // } + // // optional - registration + // ], // // Comment out any profiles you do not wish to support. Each profile can support multiple versions // if supported by core. We currently only have 3_0_1 profiles but will soon support DSTU2 and R4 versions. diff --git a/src/index.js b/src/index.js index f993006..9c16df7 100644 --- a/src/index.js +++ b/src/index.js @@ -11,7 +11,7 @@ let main = async function () { // Start our FHIR server let server = FHIRServer.initialize(fhirServerConfig); - server.listen(fhirServerConfig.server.port, () => server.logger.verbose('Server is up and running!')); + server.listen(fhirServerConfig.server.port, () => server.logger.verbose(`Server is up and running on port ${fhirServerConfig.server.port}!`)); }; main();