-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (48 loc) · 2.14 KB
/
docker-compose.yml
File metadata and controls
55 lines (48 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
services:
xxx:
# The image is available on private docker hub, you can use your own image if you have built it
image: xxx/xxx:latest
container_name: xxx
# The environment variables are used to configure the application
# Use the correct values for the environment variables
# Change the <xxx> to the correct values to reflect your environment
environment:
- TZ=Asia/Kolkata
- GUNICORN_ARG_WORKERS=<Number of workers to be used, normally 2 * number of CPU cores; integer>
- GUNICORN_ARG_THREADS=<Number of threads to be used, normally 2 * number of workers; integer>
- GUNICORN_ARG_TIMEOUT=<Timeout for the request; integer>
- GUNICORN_ARG_BIND_PORT=<Port to bind the application; integer>
- POSTGRES_DB_USERNAME=<Postgres database username; string>
- POSTGRES_DB_PASSWORD=<Postgres database password; string>
- POSTGRES_DB_HOST=<Postgres database host; string>
- POSTGRES_DB_PORT=<Postgres database port; integer>
- POSTGRES_DB_DATABASE=<Postgres database name; string>
- LOG_LEVEL=<Log level in the api; integer>
- NUMBER_OF_LOGS_TO_DISPLAY=<Number of logs to display in the api; integer>
# The ports are used to expose the application to the host machine
ports:
- "8086:8086" # Note: Make sure it matches with the GUNICORN_ARG_BIND_PORT
# The volumes are used to store the logs
# LHS is the host machine path and RHS is the container path
# Change the LHS to the correct path to store the logs (if required)
volumes:
- /var/log/xxx:/var/log/api
networks:
- internal_network
# The restart policy is set to always to restart the container in case of failure
restart: always
postgres-database:
image: postgres:16
container_name: postgres-database
environment:
- POSTGRES_PASSWORD=<Postgres database password; string>
- POSTGRES_USER=<Postgres database username; string>
- POSTGRES_DB=<Postgres database name; string>
volumes:
- /var/lib/postgresql/data:/var/lib/postgresql/data
restart: always
networks:
- internal_network
networks:
internal_network:
driver: bridge