Skip to content

Commit

Permalink
test sites
Browse files Browse the repository at this point in the history
  • Loading branch information
sakthi-aot committed May 8, 2024
1 parent efb9944 commit 1387c70
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
3 changes: 2 additions & 1 deletion backend/sites/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN mkdir -p /home/node/.npm \

# Install packages, build, and keep only prod packages
WORKDIR /app
#test

# Copy package.json and package-lock.json
COPY package*.json ./
Expand All @@ -34,4 +35,4 @@ RUN npm run build
EXPOSE 4007

# Start the API
CMD ["sh", "start.sh"]
CMD ["sh", "start.sh"]
33 changes: 9 additions & 24 deletions backend/sites/Dockerfile-migrations-openshift
Original file line number Diff line number Diff line change
@@ -1,39 +1,24 @@
FROM node:16.14.0-alpine
#FROM artifacts.developer.gov.bc.ca/docker-remote/node:14.17.1-alpine

# Set cache directory within the user's home directory
# Set npm cache directory
ENV NPM_CONFIG_CACHE=/home/node/.npm

# Install packages, build, and keep only prod packages
WORKDIR /app

# A wildcard is used to ensure both package.json AND package-lock.json are copied
# Copy package.json and package-lock.json
COPY package*.json ./

# Set NODE_ENV environment variable

RUN npm ci


#RUN npm build
# Install app dependencies using the `npm ci` command instead of `npm install`
RUN npm config set unsafe-perm true \
&& npm ci \
&& npm config set unsafe-perm false

# Bundle app source
COPY . .

# Set permissions for the application directory
RUN chmod -R 755 /app
# Ensure ownership of .npm folder
RUN mkdir -p /home/node/.npm \
&& chown -R node:node /home/node/.npm

# Install PostgreSQL client if needed
# Install PostgreSQL client
# Install postgresql-client
RUN apk add --no-cache postgresql-client

# Disable npm cache
RUN npm config set cache false
# Set executable permissions for scripts
RUN chmod +x initDB.sh


ENTRYPOINT ["sh", "initDB.sh"]
# Define the entrypoint
ENTRYPOINT [ "sh", "initDB.sh" ]

0 comments on commit 1387c70

Please sign in to comment.