diff --git a/basharin_sevastyan_lab_2/README.md b/basharin_sevastyan_lab_2/README.md new file mode 100644 index 0000000..e69de29 diff --git a/basharin_sevastyan_lab_2/app1/Dockerfile b/basharin_sevastyan_lab_2/app1/Dockerfile new file mode 100644 index 0000000..ca02ee7 --- /dev/null +++ b/basharin_sevastyan_lab_2/app1/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.11 +COPY . . +COPY var/data /var/data +COPY var/result /var/result +CMD ["python", "app.py"] \ No newline at end of file diff --git a/basharin_sevastyan_lab_2/app1/main.py b/basharin_sevastyan_lab_2/app1/main.py new file mode 100644 index 0000000..cd9ac48 --- /dev/null +++ b/basharin_sevastyan_lab_2/app1/main.py @@ -0,0 +1,6 @@ +def main(): + pass + + +if __name__ == "__main__": + main() diff --git a/basharin_sevastyan_lab_2/app1/var/data/data.txt b/basharin_sevastyan_lab_2/app1/var/data/data.txt new file mode 100644 index 0000000..e69de29 diff --git a/basharin_sevastyan_lab_2/app2/Dockerfile b/basharin_sevastyan_lab_2/app2/Dockerfile new file mode 100644 index 0000000..ca02ee7 --- /dev/null +++ b/basharin_sevastyan_lab_2/app2/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.11 +COPY . . +COPY var/data /var/data +COPY var/result /var/result +CMD ["python", "app.py"] \ No newline at end of file diff --git a/basharin_sevastyan_lab_2/app2/main.py b/basharin_sevastyan_lab_2/app2/main.py new file mode 100644 index 0000000..cd9ac48 --- /dev/null +++ b/basharin_sevastyan_lab_2/app2/main.py @@ -0,0 +1,6 @@ +def main(): + pass + + +if __name__ == "__main__": + main() diff --git a/basharin_sevastyan_lab_2/app2/var/data/data.txt b/basharin_sevastyan_lab_2/app2/var/data/data.txt new file mode 100644 index 0000000..e69de29 diff --git a/basharin_sevastyan_lab_2/docker-compose.yaml b/basharin_sevastyan_lab_2/docker-compose.yaml new file mode 100644 index 0000000..4de2fdc --- /dev/null +++ b/basharin_sevastyan_lab_2/docker-compose.yaml @@ -0,0 +1,19 @@ +version: "3" +services: + worker-1: + build: + context: /app1 + dockerfile: Dockerfile + volumes: + - ./data:/var/data + - ./result:/var/result + + worker-2: + depends_on: + - worker-1 + build: + context: /app2 + dockerfile: Dockerfile + volumes: + - ./result:/var/data + - ./result:/var/result \ No newline at end of file