-
Notifications
You must be signed in to change notification settings - Fork 38
/
Dockerfile.dev
46 lines (32 loc) · 1.03 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Development Dockerfile to be run from the docker-compose.yml (run: docker compose up)
FROM python:3.11
ENV DEBIAN_FRONTEND=noninteractive
#COPY .nvmrc .
# $(cat .nvmrc)
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
RUN chmod +x ./nodesource_setup.sh && ./nodesource_setup.sh
RUN apt install -y nodejs
RUN npm install -g pm2
RUN pip install aider-chat
ENV user=sophia
ENV homedir=/home/sophia/
RUN useradd --create-home -g users sophia
WORKDIR $homedir
RUN mkdir ".husky"
COPY .husky/install.mjs .husky/install.mjs
COPY package*.json ./
RUN npm install
COPY . .
# Install Angular dependencies and build Angular app
WORKDIR $homedir/frontend
COPY frontend/package*.json ./
RUN npm install
# Set work directory back to home
WORKDIR $homedir
# Switch to non-root user
USER $user
ENV NODE_ENV=production
# In the frontend package.jsson the `ng serve` needs the arg --host 0.0.0.0 for it to be available from the host machine
EXPOSE 4200
EXPOSE 3000
CMD ["pm2-runtime", "start", "resources/ecosystem.config.js"]