DiGiAI commited on
Commit
aa70942
·
1 Parent(s): 82e1fa2

Add application file

Browse files
Files changed (4) hide show
  1. .dockerfile +9 -3
  2. .dockerignore +1 -0
  3. Procfile +2 -0
  4. fly.toml +26 -0
.dockerfile CHANGED
@@ -2,18 +2,24 @@
2
  # you will also find guides on how best to write your Dockerfile
3
 
4
  # Use an official Python runtime as a parent image
 
5
  FROM python:3.9
6
 
7
- # Set the working directory in the container
8
  WORKDIR /code
9
 
 
 
 
 
 
 
 
10
  # Install Node.js for Prisma CLI
11
  RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
12
  RUN apt-get install -y nodejs
13
 
14
  # Copy the requirements.txt file and install Python dependencies
15
  COPY requirements.txt ./
16
- RUN pip install --no-cache-dir -r requirements.txt
17
 
18
  # Copy the Prisma schema file
19
  COPY prisma/schema.prisma ./prisma/
@@ -28,4 +34,4 @@ RUN npx prisma generate
28
  COPY . .
29
 
30
  # Your start command
31
- CMD [ "python", "app.py" ]
 
2
  # you will also find guides on how best to write your Dockerfile
3
 
4
  # Use an official Python runtime as a parent image
5
+
6
  FROM python:3.9
7
 
 
8
  WORKDIR /code
9
 
10
+ COPY ./requirements.txt /code/requirements.txt
11
+
12
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
+
14
+ COPY . .
15
+
16
+
17
  # Install Node.js for Prisma CLI
18
  RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
19
  RUN apt-get install -y nodejs
20
 
21
  # Copy the requirements.txt file and install Python dependencies
22
  COPY requirements.txt ./
 
23
 
24
  # Copy the Prisma schema file
25
  COPY prisma/schema.prisma ./prisma/
 
34
  COPY . .
35
 
36
  # Your start command
37
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
.dockerignore ADDED
@@ -0,0 +1 @@
 
 
1
+ fly.toml
Procfile ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ # TODO: Modify this Procfile to fit your needs
2
+ web: gunicorn app:app
fly.toml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # fly.toml app configuration file generated for atlas-g on 2024-01-23T07:16:02-05:00
2
+ #
3
+ # See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4
+ #
5
+
6
+ app = "atlas-g"
7
+ primary_region = "iad"
8
+
9
+ [build]
10
+ builder = "paketobuildpacks/builder:base"
11
+
12
+ [env]
13
+ PORT = "8080"
14
+
15
+ [http_service]
16
+ internal_port = 8080
17
+ force_https = true
18
+ auto_stop_machines = true
19
+ auto_start_machines = true
20
+ min_machines_running = 0
21
+ processes = ["app"]
22
+
23
+ [[vm]]
24
+ cpu_kind = "shared"
25
+ cpus = 1
26
+ memory_mb = 1024