You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.7 KiB

version: "2.1"
networks:
u_net:
services:
u_server:
image: unki/u_server
networks:
- u_net
volumes:
- ../target/x86_64-unknown-linux-musl/release/u_server:/u_server
- ../:/unki/
working_dir: /unki
command: bash -c "diesel setup && diesel migration run && /u_server"
depends_on:
u_db:
condition: service_healthy
expose:
- '63714'
environment:
RUST_LOG: warp
env_file:
- .env
healthcheck:
test: /bin/ss -tlpn | grep 63714
interval: 5s
timeout: 2s
retries: 2
u_db:
image: unki/u_db
networks:
- u_net
expose:
- '5432'
environment:
- POSTGRES_PASSWORD=${PG_PASSWORD}
healthcheck:
test: /bin/ss -tlpn | grep 5432
interval: 5s
timeout: 2s
retries: 2
u_agent_1:
image: unki/u_agent
networks:
- u_net
volumes:
- ../target/x86_64-unknown-linux-musl/release/u_agent:/u_agent
command: /u_agent u_server
depends_on:
u_server:
condition: service_healthy
u_agent_2:
image: unki/u_agent
networks:
- u_net
volumes:
- ../target/x86_64-unknown-linux-musl/release/u_agent:/u_agent
command: /u_agent u_server
depends_on:
u_server:
condition: service_healthy
tests_runner:
image: unki/tests_runner
networks:
- u_net
volumes:
- ./:/tests/
- ~/.cargo/registry:/root/.cargo/registry
working_dir:
/tests/
depends_on:
u_agent_1:
condition: service_started
u_agent_2:
condition: service_started
u_server:
condition: service_healthy