Skip to content

Commit cf4e39a

Browse files
authored
Merge pull request #1 from aimclub/master
Make docker compose (aimclub#124)
2 parents e6e15f6 + 131d481 commit cf4e39a

File tree

6 files changed

+33237
-55756
lines changed

6 files changed

+33237
-55756
lines changed

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
scripts
3+
.dockerignore
4+
.git
5+
.github
6+
.gitignore
7+
.env
8+
9+
npm-debug.log
10+
11+
Dockerfile
12+
.dockerignore

Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# syntax=docker/dockerfile:1.7-labs
2+
3+
FROM node:16 AS frontend
4+
5+
ARG REACT_APP_BASE_URL="http://127.0.0.1:5000"
6+
ENV REACT_APP_BASE_URL=$REACT_APP_BASE_URL
7+
8+
# Set the working directory inside the container
9+
WORKDIR /app
10+
11+
# Copy package.json and package-lock.json
12+
COPY frontend/package*.json ./
13+
14+
RUN npm install
15+
16+
COPY frontend/ .
17+
18+
RUN yarn build
19+
20+
21+
FROM python:3.10
22+
23+
WORKDIR /app
24+
25+
COPY --from=frontend /app/build frontend/build
26+
27+
COPY requirements.txt /app
28+
RUN --mount=type=cache,target=/root/.cache/pip \
29+
pip3 install -r requirements.txt
30+
31+
COPY --exclude=frontend . /app
32+
33+
ENTRYPOINT ["python3"]
34+
CMD ["main.py"]

docker-compose.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: fedot
2+
3+
services:
4+
5+
app:
6+
build:
7+
context: .
8+
args:
9+
- REACT_APP_BASE_URL=http://0.0.0.0:5000
10+
ports:
11+
- 5000:5000
12+
environment:
13+
FLASK_HOST: 0.0.0.0
14+
FLASK_PORT: 5000
15+
REACT_APP_BASE_URL: http://0.0.0.0:5000
16+
MONGO_CONN_STRING: mongodb://fedot:netot@mongo:27017/admin?compressors=zlib
17+
18+
19+
mongo:
20+
image: mongo:8
21+
restart: always
22+
ports:
23+
- 27017:27017
24+
environment:
25+
MONGO_INITDB_ROOT_USERNAME: fedot
26+
MONGO_INITDB_ROOT_PASSWORD: netot
27+
volumes:
28+
- mongo-data:/data/db
29+
30+
volumes:
31+
mongo-data:

0 commit comments

Comments
 (0)