Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker for alpine. Yarn isn’t working #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
28 changes: 14 additions & 14 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand All @@ -30,31 +30,31 @@ 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,
origin: whitelist
}
},
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.
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();