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.

104 lines
2.5 KiB

version: "3.4"
x-global:
user: &user
"${DOCKER_UID:-1000}:${DOCKER_GID:-1000}"
networks:
u_net:
services:
u_server:
user: *user
image: localhost/unki/u_server
networks:
- u_net
volumes:
- ../target/x86_64-unknown-linux-musl/${PROFILE:-debug}/u_server:/unki/u_server
- ../logs:/unki/logs:rw
working_dir: /unki
3 years ago
command: /unki/u_server
depends_on:
u_db:
condition: service_healthy
3 years ago
ports:
- 9990:9990
env_file:
- ../.env
3 years ago
- ../.env.private
environment:
RUST_LOG: warp=info,u_server_lib=debug,u_lib=debug
healthcheck:
test: ss -tlpn | grep 9990
interval: 5s
timeout: 2s
retries: 2
u_db:
image: localhost/unki/u_db
networks:
- u_net
ports:
- 54321:5432
env_file:
- ../.env
3 years ago
- ../.env.private
volumes:
- ../target/x86_64-unknown-linux-musl/${PROFILE:-debug}/migrator:/migrator
- type: bind
source: ../scripts/u_db_entrypoint.sh
target: /u_db_entrypoint.sh
command: /u_db_entrypoint.sh
healthcheck:
# test if db's port is open and db is created
test: ss -tlpn | grep 5432 && psql -lqt -U $${POSTGRES_USER} | grep -qw $${POSTGRES_DATABASE}
interval: 5s
timeout: 5s
retries: 3
3 years ago
u_agent:
user: *user
image: localhost/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: bash -c "/unki/u_agent u_server; sleep 3600"
3 years ago
env_file:
- ../.env
environment:
RUST_LOG: u_agent=debug,u_lib=debug
depends_on:
u_server:
condition: service_healthy
tests_runner:
user: *user
image: localhost/unki/tests_runner
networks:
- u_net
volumes:
- ${HOME}/.cargo/registry/:/usr/local/cargo/registry/
- ../__Cargo_integration.toml:/tests/Cargo.toml
- ./:/tests/integration-tests/
- ../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-tests/logs:rw
working_dir:
/tests/integration-tests/
depends_on:
3 years ago
u_agent:
condition: service_started
u_server:
condition: service_healthy
3 years ago
env_file:
- ../.env
- ../.env.private
environment:
RUST_BACKTRACE: 1
RUST_LOG: hyper=info,reqwest=info
U_SERVER: u_server