61 lines
No EOL
1.4 KiB
YAML
61 lines
No EOL
1.4 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# PostgreSQL for testing
|
|
postgres:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.test-postgres
|
|
container_name: ci-cd-test-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: sharenet_test
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: password
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- ci-cd-test-network
|
|
|
|
# Rust toolchain container for backend testing
|
|
rust-toolchain:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile.test-rust
|
|
container_name: ci-cd-test-rust
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /workspace/backend:/workspace/backend
|
|
working_dir: /workspace/backend
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- ci-cd-test-network
|
|
command: sleep infinity
|
|
|
|
# Node.js toolchain container for frontend testing
|
|
node-toolchain:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile.test-node
|
|
container_name: ci-cd-test-node
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /workspace/frontend:/workspace/frontend
|
|
working_dir: /workspace/frontend
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- ci-cd-test-network
|
|
command: sleep infinity
|
|
|
|
networks:
|
|
ci-cd-test-network:
|
|
driver: bridge |