Skip to content

Commit dfb6f84

Browse files
committed
Add Redis service configurations and update environment profiles
1 parent dd4300c commit dfb6f84

File tree

8 files changed

+36
-5
lines changed

8 files changed

+36
-5
lines changed

compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ services:
250250
- source: redis_data
251251
target: /data
252252
type: volume
253+
profiles:
254+
- redis
253255

254256
# https://docs.docker.com/reference/compose-file/volumes/
255257
volumes:

docker/compose.deploy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ services:
253253
- source: redis_data
254254
target: /data
255255
type: volume
256+
profiles:
257+
- redis
256258

257259
volumes:
258260
caddy_config:

docker/compose.devcontainer.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,25 @@ services:
168168
published: ${REDIS_MAPPED_PORT:?error}
169169
target: 6379
170170
# https://docs.docker.com/reference/compose-file/volumes/
171+
redis-test:
172+
ports:
173+
- host_ip: ${REDIS_MAPPED_HOST_IP:?error}
174+
name: redis
175+
published: ${REDIS_TEST_MAPPED_PORT:?error}
176+
target: 6379
177+
volumes:
178+
- source: redis_test_data
179+
target: /data
180+
type: volume
171181
volumes:
172182
api_bash_history:
173183
api_node_modules:
174184
api_pnpm_store:
175185
cloudbeaver_data:
176186
minio_test_data:
177187
postgres_test_data:
188+
redis_test_data:
189+
178190

179191

180192

docker/compose.testing.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,19 @@ services:
101101
profiles:
102102
- postgres_test
103103
# https://docs.docker.com/reference/compose-file/services/#restart
104-
restart: unless-stopped
104+
restart: unless-stopped
105+
106+
redis-test:
107+
image: redis:8.0-M02-alpine
108+
health-check:
109+
interval: 10s
110+
retries: 3
111+
start_interval: 1s
112+
start_period: 5s
113+
test: ["CMD", "redis-cli", "ping"]
114+
timeout: 10s
115+
networks:
116+
- redis_test
117+
restart: unless-stopped
118+
profiles:
119+
- redis_test

envFiles/.env.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ POSTGRES_USER=talawa
7373
########## docker compose ##########
7474

7575
COMPOSE_FILE=./compose.yaml:./docker/compose.testing.yaml
76-
COMPOSE_PROFILES=api,minio_test,postgres_test
76+
COMPOSE_PROFILES=api,minio_test,postgres_test,redis_test
7777
COMPOSE_PROJECT_NAME=talawa
7878

7979
############## base cost for graphql fields ##############

envFiles/.env.deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ POSTGRES_USER=talawa
8383
########## docker compose ##########
8484

8585
COMPOSE_FILE=./compose.yaml
86-
COMPOSE_PROFILES=api,caddy,minio,postgres
86+
COMPOSE_PROFILES=api,caddy,minio,postgres,redis
8787
COMPOSE_PROJECT_NAME=talawa
8888

8989
############## base cost for graphql fields ##############

envFiles/.env.devcontainer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ POSTGRES_TEST_MAPPED_PORT=5433
103103
########## docker compose ##########
104104

105105
COMPOSE_FILE=./compose.yaml:./docker/compose.testing.yaml:./docker/compose.devcontainer.yaml
106-
COMPOSE_PROFILES=api,caddy,cloudbeaver,minio,minio_test,postgres,postgres_test
106+
COMPOSE_PROFILES=api,caddy,cloudbeaver,minio,minio_test,postgres,postgres_test,redis_test
107107
COMPOSE_PROJECT_NAME=talawa
108108

109109
############## base cost for graphql fields ##############

envFiles/.env.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ POSTGRES_USER=talawa
7171
########## docker compose ##########
7272

7373
COMPOSE_FILE=./compose.yaml
74-
COMPOSE_PROFILES=api,caddy,minio,postgres
74+
COMPOSE_PROFILES=api,caddy,minio,postgres,redis
7575
COMPOSE_PROJECT_NAME=talawa
7676

7777
############## base cost for graphql fields ##############

0 commit comments

Comments
 (0)