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.
 
 
 
 
 
 

101 lines
2.2 KiB

version: "3.4"
x-global:
user: &user
"${DOCKER_UID:-1000}:${DOCKER_GID:-1000}"
networks:
u_net:
services:
u_server:
user: *user
image: unki/u_server
networks:
- u_net
volumes:
- ../target/x86_64-unknown-linux-musl/${PROFILE:-debug}/u_server:/unki/u_server
- ../certs:/unki/certs
- ../logs:/unki/logs:rw
working_dir: /unki
command: /unki/u_server
depends_on:
u_db:
condition: service_healthy
ports:
- 63714:63714
env_file:
- ../.env
- ../.env.private
environment:
RUST_LOG: info
healthcheck:
test: ss -tlpn | grep 63714
interval: 5s
timeout: 2s
retries: 2
u_db:
image: unki/u_db
networks:
- u_net
ports:
- 54321:5432
env_file:
- ../.env
- ../.env.private
working_dir: /unki
volumes:
- ../migrations:/unki/migrations
command: /unki/u_db_entrypoint.sh svc
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_agent:
user: *user
image: unki/u_agent
networks:
- u_net
volumes:
- ../target/x86_64-unknown-linux-musl/${PROFILE:-debug}/u_agent:/unki/u_agent
- ../logs:/unki/logs:rw
working_dir: /unki
command: /unki/u_agent u_server
env_file:
- ../.env
environment:
RUST_LOG: u_agent=debug,u_lib=debug
depends_on:
u_server:
condition: service_healthy
tests_runner:
user: *user
image: unki/tests_runner
networks:
- u_net
volumes:
- ../__Cargo_integration.toml:/tests/Cargo.toml
- ./:/tests/integration/
- ../certs:/tests/certs
- ../target/x86_64-unknown-linux-musl/${PROFILE:-debug}/u_panel:/u_panel
- ../lib/u_lib:/tests/lib/u_lib
- ../logs:/tests/integration/logs:rw
working_dir:
/tests/integration/
depends_on:
u_agent:
condition: service_started
u_server:
condition: service_healthy
env_file:
- ../.env
- ../.env.private
environment:
RUST_BACKTRACE: 1
U_SERVER: u_server