Skip to content

Commit

Permalink
update docker-compose.test
Browse files Browse the repository at this point in the history
  • Loading branch information
usmskolyadin committed Dec 23, 2024
1 parent 00ccd2d commit c4f7d05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.8'
services:
db:
image: postgres:16.2
container_name: db
container_name: sm_db
restart: always
environment:
- POSTGRES_DB=${DB_NAME}
Expand All @@ -14,7 +14,7 @@ services:
volumes:
- ./db:/var/lib/postgresql/data
networks:
- backend
- sm_backend
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER}']
interval: 10s
Expand All @@ -25,7 +25,7 @@ services:
build:
context: .
dockerfile: Dockerfile
container_name: app
container_name: sm_app
depends_on:
db:
condition: service_healthy
Expand All @@ -35,10 +35,10 @@ services:
env_file:
- .env
volumes:
- ./:/backend/
- ./:/sm_backend/
networks:
- backend
- sm_backend

networks:
backend:
sm_backend:
driver: "bridge"
12 changes: 6 additions & 6 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.8'

services:
db_test:
container_name: db_test
container_name: sm_db_test
image: postgres:16.2
env_file:
- .env.test
Expand All @@ -19,12 +19,12 @@ services:
timeout: 5s
retries: 5
networks:
- backend
- sm_backend
tests:
build:
context: .
dockerfile: Dockerfile.test
container_name: tests
container_name: sm_tests
depends_on:
db_test:
condition: service_healthy
Expand All @@ -33,10 +33,10 @@ services:
env_file:
- .env.test
volumes:
- ./:/backend/
- ./:/sm_backend/
networks:
- backend
- sm_backend

networks:
backend:
sm_backend:
driver: "bridge"

0 comments on commit c4f7d05

Please sign in to comment.