-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_ci_pipeline.yml
More file actions
97 lines (92 loc) · 2.93 KB
/
_ci_pipeline.yml
File metadata and controls
97 lines (92 loc) · 2.93 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
version: "3"
services:
postgres-db:
container_name: postgres-db-test
build:
context: ./services/db/
env_file:
- .env
ports:
- "5432:5432"
volumes:
- postgres_data_test:/var/lib/postgresql/data
networks:
micro-services-network:
ipv4_address: 192.168.0.10
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER} -d ${TEST_POSTGRES_DB}",
]
interval: 5s
timeout: 5s
retries: 5
api-server:
container_name: api-server-test
build:
context: .
dockerfile: ./services/api/Dockerfile.api
tty: true
command: tail -f /dev/null # Keep container running
volumes:
- .:/app # Mount the entire project directory to watch file changes
expose:
- 8000
env_file:
- .env
environment:
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- ANDROID_CLIENT_ID=${ANDROID_CLIENT_ID}
- DB_HOST=postgres-db
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- DJANGO_SUPERUSER_FIRST_NAME=${DJANGO_SUPERUSER_FIRST_NAME}
- DJANGO_SUPERUSER_LAST_NAME=${DJANGO_SUPERUSER_LAST_NAME}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- IOS_CLIENT_ID=${IOS_CLIENT_ID}
- PORT=${PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${TEST_POSTGRES_DB}
- SECRET_KEY=${SECRET_KEY}
- WEB_CLIENT_ID=${WEB_CLIENT_ID}
- WEB_CLIENT_SECRET=${WEB_CLIENT_SECRET}
- REDIS_HOST=redis
- SUPABASE_URL=${SUPABASE_URL}
- SUPABASE_ANON_KEY=${SUPABASE_ANON_KEY}
- USE_SUPABASE_STORAGE=${USE_SUPABASE_STORAGE}
depends_on:
postgres-db:
condition: service_healthy
redis:
condition: service_healthy
networks:
micro-services-network:
ipv4_address: 192.168.0.11
redis:
container_name: redis-server-test
build:
context: ./services/redis/
ports:
- "6370:6370"
networks:
micro-services-network:
ipv4_address: 192.168.0.12
volumes:
- redis_data_test:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
networks:
micro-services-network:
ipam:
driver: default
config:
- subnet: "192.168.0.0/24"
gateway: "192.168.0.1"
volumes:
postgres_data_test:
redis_data_test: