Skip to content

Commit

Permalink
Merge pull request #33 from moevm/frontend
Browse files Browse the repository at this point in the history
Исправлен докерфайл
  • Loading branch information
azazzze1 authored Dec 21, 2024
2 parents 9d98d68 + 9af0afd commit 539cb43
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion backend/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

app = Flask(__name__, static_folder='static')

cors = CORS(app, resources={r"/api/*": {"origins": ["http://localhost:4200"]}})
cors = CORS(app, resources={r"/api/*": {"origins": ["http://localhost:4200", "http://localhost:8080"]}})

app.secret_key = ' key'
app.config['JSON_AS_ASCII'] = False
Expand Down
2 changes: 0 additions & 2 deletions backend/app/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import os
import csv

# Настройка CORS
CORS(app, resources={r"/api/*": {"origins": "http://localhost:8080"}})

@app.route('/api/')
@app.route('/index')
Expand Down
13 changes: 5 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
version: '3.8'

services:
neo4j:
db:
build:
context: ./neo4j
dockerfile: Dockerfile
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=neo4j/password
networks:
- neo4j-network
volumes:
- neo4j-data:/var/lib/neo4j/data
- neo4j-data:/data
- neo4j-import:/var/lib/neo4j/import

backend:
Expand All @@ -24,11 +21,11 @@ services:
- "127.0.0.1:5000:5000"
environment:
- FLASK_ENV=development
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_URI=bolt://db:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=password
depends_on:
- neo4j
- db
networks:
- neo4j-network
volumes:
Expand All @@ -39,7 +36,7 @@ services:
context: ./frontend
dockerfile: Dockerfile
ports:
- "8080:4200"
- "127.0.0.1:8080:4200"
networks:
- neo4j-network

Expand Down
2 changes: 2 additions & 0 deletions neo4j/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ COPY dumps/ /var/lib/neo4j/import/
ENV NEO4J_AUTH=neo4j/password

EXPOSE 7474 7687

CMD ["neo4j", "console"]

0 comments on commit 539cb43

Please sign in to comment.