-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (70 loc) · 1.87 KB
/
docker-compose.yml
File metadata and controls
75 lines (70 loc) · 1.87 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
services:
db:
image: postgres:13
platform: linux/amd64 # Forces the use of amd64 architecture
container_name: tckdb_postgres
restart: always
env_file:
- ./tckdb/backend/app/core/.env
ports:
- 5433:5432 # Maps host port 5433 to container port 5432
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- tckdb_network
test-db:
image: postgres:13
platform: linux/amd64 # Ensures compatibility on AMD64 platforms
container_name: tckdb_test_postgres
restart: always
env_file:
- ./tckdb/backend/app/core/.env.test # Separate env file for testing
ports:
- 5434:5432 # Maps host port 5434 to container port 5432
volumes:
- postgres_test_data:/var/lib/postgresql/data
networks:
- tckdb_network
app:
build: .
user: "${UID:-1000}:${GID:-1000}"
platform: linux/amd64 # Forces the use of amd64 architecture
container_name: tckdb_app
environment:
- RUNNING_IN_DOCKER=true
- SQLALCHEMY_DATABASE_URI=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_SERVER}:5432/${POSTGRES_DB}
env_file:
- ./tckdb/backend/app/core/.env
volumes:
- ./tckdb:/code/tckdb
ports:
- 8000:8000 # Maps host port 8000 to container port 8000
depends_on:
- db
- test-db
networks:
- tckdb_network
pgadmin:
image: dpage/pgadmin4
platform: linux/amd64 # Ensures compatibility on AMD64 platforms
container_name: pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
ports:
- 5050:80
depends_on:
- db
- test-db
volumes:
- pgadmin_data:/var/lib/pgadmin
networks:
- tckdb_network
volumes:
postgres_data:
postgres_test_data:
pgadmin_data:
networks:
tckdb_network:
driver: bridge