-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
90 lines (81 loc) · 2.19 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
86
87
88
89
90
---
x-common-environment: &common-env
ConnectionStrings__DefaultConnection: Server=postgres;Port=5432;Database=${POSTGRES_USER};Userid=${POSTGRES_USER};Password=${POSTGRES_PASSWORD};SslMode=Prefer;TrustServerCertificate=true
Redis__ConnectionString: redis,ssl=false,name=${REDIS_NAME}
ASPNETCORE_ENVIRONMENT: Production
services:
redis:
image: redis:7.2-alpine
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 5s
retries: 5
environment:
REDIS_NAME: ${POSTGRES_USER}
postgres:
image: postgres:16.2-alpine
restart: always
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
depends_on:
redis:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 5
bot:
restart: always
environment:
<<: *common-env
Discord__BotToken: ${DISCORD_BOT_TOKEN}
Discord__DevGuildId: ${DISCORD_DEV_GUILD}
RunMigrations: ${BLINK_RUN_MIGRATIONS}
WordsApiKey: ${WORDS_API_KEY}
depends_on:
postgres:
condition: service_healthy
image: ghcr.io/epicofficer/blink3.bot:latest
api:
restart: always
environment:
<<: *common-env
Discord__ClientId: ${DISCORD_CLIENT_ID}
Discord__ClientSecret: ${DISCORD_CLIENT_SECRET}
ApiAllowedOrigins__0: ${API_ALLOWED_ORIGIN}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
depends_on:
postgres:
condition: service_healthy
image: ghcr.io/epicofficer/blink3.api:latest
networks:
- default
- public
web:
restart: always
image: ghcr.io/epicofficer/blink3.web:latest
environment:
API_ADDRESS: ${API_URL}
CLIENT_ID: ${DISCORD_CLIENT_ID}
depends_on:
- api
networks:
- public
# Not implemented, yet...
#activity:
# restart: always
# image: ghcr.io/epicofficer/blink3.activity:latest
# networks:
# - public
networks:
public:
driver: bridge
volumes:
postgres_data: