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.
 
 
 
 
 
 

118 lines
2.5 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
- ../certs:/unki/certs
working_dir: /unki
command: /u_server
depends_on:
u_db:
condition: service_healthy
expose:
- '63714'
env_file:
- ../.env
- ../.env.private
environment:
RUST_LOG: trace
healthcheck:
test: ss -tlpn | grep 63714
interval: 5s
timeout: 2s
retries: 2
u_db:
image: unki/u_db
networks:
- u_net
expose:
- '5432'
env_file:
- ../.env
- ../.env.private
working_dir: /unki
volumes:
- ../migrations:/unki/migrations
command: /unki/u_db_entrypoint.sh
healthcheck:
# test if db's port is open and db is created
test: ss -tlpn | grep 5432 && psql -lqt -U $${DB_USER} | grep -qw $${DB_NAME}
interval: 5s
timeout: 5s
retries: 3
u_db_gen_schema:
image: unki/u_db
env_file:
- ../.env
- ../.env.private
working_dir: /unki
volumes:
- ../:/unki/
command: /unki/images/integration-tests/u_db_entrypoint.sh
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
env_file:
- ../.env
environment:
RUST_LOG: u_agent=debug
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
env_file:
- ../.env
environment:
RUST_LOG: u_agent=debug
depends_on:
u_server:
condition: service_healthy
tests_runner:
image: unki/tests_runner
networks:
- u_net
volumes:
- ~/.cargo/registry:/root/.cargo/registry
- ./:/tests/
- ../certs:/certs
- ../target/x86_64-unknown-linux-musl/release/u_panel:/u_panel
- ../lib/u_lib:/lib/u_lib
- ../lib/u_api_proc_macro:/lib/u_api_proc_macro
working_dir:
/tests/
depends_on:
u_agent_1:
condition: service_started
u_agent_2:
condition: service_started
u_server:
condition: service_healthy
env_file:
- ../.env
- ../.env.private
environment:
RUST_BACKTRACE: 1
U_SERVER: u_server