circulartext commited on
Commit
396c1f3
1 Parent(s): a0e93dc

Create .yml

Browse files
Files changed (1) hide show
  1. .yml +28 -0
.yml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: 2.1
2
+
3
+ jobs:
4
+ build-and-run:
5
+ docker:
6
+ - image: circulartextapp/spaceread
7
+ auth:
8
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
9
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
10
+ steps:
11
+ - run:
12
+ name: Create new user
13
+ command: useradd -m -u 1000 user
14
+ - run:
15
+ name: Switch to new user
16
+ command: su - user
17
+ - run:
18
+ name: Install dependencies
19
+ command: pip install -r requirements.txt
20
+ - run:
21
+ name: Copy entrypoint script
22
+ command: cp entrypoint.sh /usr/local/bin/entrypoint.sh
23
+ - run:
24
+ name: Make entrypoint script executable
25
+ command: chmod +x /usr/local/bin/entrypoint.sh
26
+ - run:
27
+ name: Start the application
28
+ command: uvicorn app.main:app --host 0.0.0.0 --port 7860 --reload