95 lines
2.6 KiB
Docker
95 lines
2.6 KiB
Docker
# ########## Original Dockerfile ##########
|
|
# FROM node:18
|
|
|
|
# # Install basic development tools
|
|
# RUN apt update && apt install -y less man-db sudo
|
|
|
|
# # Ensure default `node` user has access to `sudo`
|
|
# ARG USERNAME=node
|
|
# RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
|
# && chmod 0440 /etc/sudoers.d/$USERNAME
|
|
|
|
# # Set `DEVCONTAINER` environment variable to help with orientation
|
|
# #ENV DEVCONTAINER=true
|
|
# #! env declarations not copied to devcontainer
|
|
|
|
# ########## Modified Dockerfile ##########
|
|
|
|
# FROM node:18-alpine
|
|
|
|
# ## Install basic development tools
|
|
# #RUN apt update && apt install -y less man-db sudo
|
|
|
|
# # # Ensure default `node` user has access to `sudo`
|
|
# # ARG USERNAME=node
|
|
# # RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
|
# # && chmod 0440 /etc/sudoers.d/$USERNAME
|
|
|
|
# WORKDIR /app
|
|
|
|
# # Copy package.json and package-lock.json
|
|
# COPY package*.json ./
|
|
|
|
|
|
# #RUN apt-get update && apt-get install -y git
|
|
# #RUN git config --global user.name "Dobromir Popov"
|
|
# #RUN git config --global user.email "d-popov@abv.bg"
|
|
|
|
|
|
# # Install dependencies
|
|
# RUN npm install ws express request node-persist body-parser dotenv #--only=production
|
|
|
|
# # Copy the rest of the application files
|
|
# COPY . .
|
|
|
|
# # Start the application
|
|
# #CMD ["npm", "start"]
|
|
# CMD npm start
|
|
# # portainer: '-c' 'echo Container started; trap "exit 0" 15; exec npm start'
|
|
|
|
# EXPOSE 8080 8081
|
|
|
|
# # Set `DEVCONTAINER` environment variable to help with orientation
|
|
# ENV DEVCONTAINER=true
|
|
|
|
|
|
# oriiginal
|
|
FROM node:current-alpine
|
|
# current-alpine
|
|
ENV NODE_ENV=demo
|
|
|
|
# RUN apk update && apk add bash
|
|
RUN apk update && apk add git
|
|
#RUN npm install -g npm@latest
|
|
|
|
|
|
WORKDIR /app
|
|
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
|
# RUN npm install --production --silent
|
|
# && mv node_modules ../
|
|
COPY . .
|
|
RUN npm install
|
|
#RUN mpm install nodemon
|
|
EXPOSE 8080 8081
|
|
|
|
|
|
# Install Python and pip
|
|
RUN apk add --no-cache python3 py3-pip
|
|
# If you need Python to be the default version, make a symbolic link to python3
|
|
RUN if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python; fi
|
|
|
|
# Install Chromium and Chromium WebDriver # comment to reduce the deployment image size
|
|
# RUN apk add --no-cache chromium chromium-chromedriver
|
|
|
|
# Create a virtual environment and activate it
|
|
RUN python3 -m venv /venv
|
|
RUN . /venv/bin/activate && pip install --upgrade pip && pip install -r agent-py-bot/requirements.txt
|
|
|
|
#RUN chown -R node /app
|
|
#USER node
|
|
|
|
# CMD ["npm", "start"]
|
|
|
|
# CMD ["npm", "run", "start:demo"]
|
|
CMD ["npm", "run", "start:demo-chat"]
|
|
#CMD ["npm", "run", "start:tele"] |