-
-
Notifications
You must be signed in to change notification settings - Fork 131
/
docker-compose.yaml
60 lines (55 loc) · 1.65 KB
/
docker-compose.yaml
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
# SPDX-FileCopyrightText: 2024 Tazlin
# SPDX-FileCopyrightText: 2024 ceruleandeep
#
# SPDX-License-Identifier: AGPL-3.0-or-later
services:
aihorde:
build:
context: .
dockerfile: Dockerfile
image: aihorde:latest
container_name: aihorde
ports:
- "7001:7001"
# The port number written in front of the colon (:) is the port number to be exposed to the outside, so if you change it, you can access it with localhost:{changePort}.
environment:
# Flask obtains its environment variables from the .env file.
# If you set a profile, the .env_{PROFILE} file is read instead.
- PROFILE=docker
volumes:
# .env_{PROFILE} is copied into the image when it is built.
# So that you can change the environment variables without rebuilding the image, mount the .env file.
- .env_docker:/app/.env_docker
# Likewise, you can mount the horde directory to change the source code without rebuilding the image.
- ./horde:/app/horde
networks:
- aihorde_network
depends_on:
- postgres
- redis
postgres:
image: ghcr.io/haidra-org/ai-horde-postgres:latest
container_name: postgres
restart: always
environment:
POSTGRES_PASSWORD: changeme
volumes:
# Use a named volume to persist the data even if the container is deleted.
- postgres_data:/var/lib/postgresql/data/
ports:
- "5432:5432"
networks:
- aihorde_network
redis:
image: redis:7
container_name: redis
restart: always
ports:
- "6379:6379"
networks:
- aihorde_network
networks:
aihorde_network:
driver: bridge
volumes:
postgres_data: