File tree 2 files changed +63
-0
lines changed
2 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,23 @@ export $(cat .env | xargs)
74
74
bash docker-entrypoint.sh
75
75
```
76
76
77
+ ### Docker
78
+
79
+ To build the project in docker you can use:
80
+
81
+ ``` commandline
82
+ docker-compose up --build
83
+ ```
84
+
85
+ Keep in mind docker-compose.yaml is for local DEV only.
86
+ It is NOT secure to use it in production as passwords are
87
+ hardcoded there for now (but you always can create a PR to fix it).
88
+
89
+ #### Notes
90
+
91
+ - Sending emails are disabled as this feature requires real env vars to be set.
92
+ - Redis is not being used in reality, but there is a task to move background tasks to redis.
93
+
77
94
<p align =" right " >(<a href =" #top " >back to top</a >)</p >
78
95
79
96
## Contributing
Original file line number Diff line number Diff line change
1
+ services :
2
+ futuramaapi :
3
+ build : .
4
+ command : sh docker-entrypoint.sh
5
+ volumes :
6
+ - .:/app
7
+ ports :
8
+ - 8080:8080
9
+ environment :
10
+ - ALLOW_ORIGINS=*
11
+ - DATABASE_URL=postgresql://futuramaapi:futuramaapi-psql-password@futuramaapi-postgres:5432/futuramaapi
12
+ - TRUSTED_HOST=localhost
13
+ - SECRET_KEY=PRODUCTION-SECRET-KEY
14
+ - EMAIL_FROM_DEFAULT=default@from.email
15
+ - EMAIL_HOST_USER=host-user
16
+ - EMAIL_HOST=email-host
17
+ - EMAIL_API_KEY=secret-api-key
18
+ - REDISCLOUD_URL=redis://redis-admin:futuramaapi-redis-password@futuramaapi-redis:6379
19
+ - SEND_EMAILS=false
20
+ depends_on :
21
+ - futuramaapi-postgres
22
+ - futuramaapi-redis
23
+
24
+ futuramaapi-postgres :
25
+ image : postgres:17-alpine
26
+ volumes :
27
+ - postgres_data:/var/lib/postgresql/data/
28
+ expose :
29
+ - 5432
30
+ environment :
31
+ - POSTGRES_USER=futuramaapi
32
+ - POSTGRES_PASSWORD=futuramaapi-psql-password
33
+ - POSTGRES_DB=futuramaapi
34
+
35
+ futuramaapi-redis :
36
+ image : redis:6.2-alpine
37
+ restart : always
38
+ ports :
39
+ - ' 6379:6379'
40
+ command : redis-server --save 20 1 --loglevel warning --requirepass futuramaapi-redis-password
41
+ volumes :
42
+ - futuramaapi-redis:/data
43
+
44
+ volumes :
45
+ postgres_data :
46
+ futuramaapi-redis :
You can’t perform that action at this time.
0 commit comments