gen_schema restored

pull/1/head
plazmoid 3 years ago
parent ee514ecb20
commit a7b4b333a5
  1. 4
      Makefile.toml
  2. 3
      images/integration-tests/u_db_entrypoint.sh
  3. 11
      integration/docker-compose.yml

@ -41,7 +41,9 @@ bash integration_tests.sh
[tasks.gen_schema] [tasks.gen_schema]
script = ''' script = '''
cd ./integration cd ./integration
docker-compose up -d u_server docker-compose up -d u_db_gen_schema
echo "Waiting 10 sec..."
sleep 10
docker-compose down docker-compose down
''' '''

@ -1,5 +1,6 @@
set -m set -m
export DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@127.0.0.1/${DB_NAME} export DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@127.0.0.1/${DB_NAME}
touch /unki/Cargo.toml
/usr/local/bin/docker-entrypoint.sh postgres & /usr/local/bin/docker-entrypoint.sh postgres &
sleep 10 && diesel setup && fg %1 sleep 10 && diesel setup && diesel migration run && fg %1

@ -42,7 +42,6 @@ services:
working_dir: /unki working_dir: /unki
volumes: volumes:
- ../migrations:/unki/migrations - ../migrations:/unki/migrations
- ../Cargo.toml:/unki/Cargo.toml
command: /unki/u_db_entrypoint.sh command: /unki/u_db_entrypoint.sh
healthcheck: healthcheck:
# test if db's port is open and db is created # test if db's port is open and db is created
@ -51,6 +50,16 @@ services:
timeout: 5s timeout: 5s
retries: 3 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: u_agent_1:
image: unki/u_agent image: unki/u_agent
networks: networks:

Loading…
Cancel
Save