-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
85 lines (76 loc) · 1.82 KB
/
docker-compose.yml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
services:
bot:
hostname: bot
container_name: bot
build:
context: ./bot
environment:
BOT_TOKEN: ${BOT_TOKEN}
FASTAPI_KEY: ${FASTAPI_KEY}
restart: always
depends_on:
- api
networks:
acu_net:
ipv4_address: 172.72.72.4
psql:
hostname: psql
image: postgres:14
container_name: psql
restart: on-failure
volumes:
- psql:/var/lib/postgresql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWD}
POSTGRES_DB: ${POSTGRES_DB}
TZ: Europe/Moscow
networks:
acu_net:
ipv4_address: 172.72.72.2
acunetix:
hostname: acunetix
container_name: acunetix
build:
context: ./acunetix
restart: unless-stopped
cap_add:
- LINUX_IMMUTABLE
ports:
- "13443:3443"
environment:
- ACUNETIX_EMAIL=${ACUNETIX_EMAIL}
- ACUNETIX_PASSWORD=${ACUNETIX_PASSWORD}
- MAIN_POSTGRES_DB=${POSTGRES_DB}
- MAIN_POSTGRES_PASSWORD=${POSTGRES_PASSWD}
networks:
acu_net:
ipv4_address: 172.72.72.3
api:
hostname: fastapi
container_name: fastapi
build:
context: ./fastapi
environment:
FASTAPI_KEY: ${FASTAPI_KEY}
POSTGRES_DSN: "postgresql://postgres:${POSTGRES_PASSWD}@psql:5432/${POSTGRES_DB}"
command: bash -c 'while !</dev/tcp/psql/5432; do sleep 1; done; uvicorn main:app --host 0.0.0.0'
ports:
- "8000:8000"
restart: always
depends_on:
- psql
networks:
acu_net:
ipv4_address: 172.72.72.5
volumes:
psql:
networks:
acu_net:
driver: bridge
ipam:
config:
- subnet: 172.72.72.0/24
gateway: 172.72.72.1