-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.35 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
version: "3.7"
services:
# Apollo backend
apollo-backend:
container_name: apollo-backend
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080"
networks:
- apollo-network
secrets:
- database_user
- database_password
- default_username
- default_password
- jwt_secret
depends_on:
- postgres
environment:
DATABASE_HOST: "postgres"
DATABASE_PORT: "5432"
DATABASE_NAME: "apollo-database"
# SQL database
postgres:
image: postgres:16.3@sha256:1bf73ccae25238fa555100080042f0b2f9be08eb757e200fe6afc1fc413a1b3c
container_name: postgres
ports:
- "5432:5432"
volumes:
- "apollo-data:/var/lib/postgresql/data"
networks:
- apollo-network
secrets:
- database_user
- database_password
environment:
POSTGRES_USER_FILE: "/run/secrets/database_user"
POSTGRES_PASSWORD_FILE: "/run/secrets/database_password"
POSTGRES_DB: "apollo-database"
volumes:
apollo-data:
networks:
apollo-network:
secrets:
database_user:
file: ./secrets/database_user.secret
database_password:
file: ./secrets/database_password.secret
default_username:
file: ./secrets/default_username.secret
default_password:
file: ./secrets/default_password.secret
jwt_secret:
file: ./secrets/jwt_secret.secret