From 84f97abd8962480dcc684ef57b697a643a9b863b Mon Sep 17 00:00:00 2001 From: RomanPorshnev Date: Sat, 21 Dec 2024 03:44:10 +0300 Subject: [PATCH] fix docker-compose --- .env | 3 +++ backend/{.dockerognore => .dockerignore} | 0 docker-compose.yml | 19 ++++++++----------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 .env rename backend/{.dockerognore => .dockerignore} (100%) diff --git a/.env b/.env new file mode 100644 index 0000000..9e8bf7e --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +NEO4J_USER=neo4j +NEO4J_PASSWORD=12345678 +NEO4J_AUTH=neo4j/12345678 \ No newline at end of file diff --git a/backend/.dockerognore b/backend/.dockerignore similarity index 100% rename from backend/.dockerognore rename to backend/.dockerignore diff --git a/docker-compose.yml b/docker-compose.yml index f40ffc9..be61067 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,11 @@ version: '3.9' services: - neo4j: + db: + container_name: neo4j image: neo4j:5.26 - ports: - - "7474:7474" - - "7687:7687" environment: - NEO4J_AUTH: "neo4j/12345678" + NEO4J_AUTH: ${NEO4J_AUTH} volumes: - neo4j_data:/data healthcheck: @@ -18,21 +16,20 @@ services: start_period: 30s backend: + container_name: backend build: context: ./backend ports: - "127.0.0.1:5001:5001" - volumes: - - ./backend:/app environment: - - NEO4J_URI=bolt://neo4j:7687 - - NEO4J_USER=neo4j - - NEO4J_PASSWORD=12345678 + - NEO4J_USER=${NEO4J_USER} + - NEO4J_PASSWORD=${NEO4J_PASSWORD} depends_on: - neo4j: + db: condition: service_healthy frontend: + container_name: frontend build: context: ./frontent ports: