Skip to content
Extraits de code Groupes Projets
Valider 126529e4 rédigé par Maxime DESMARCHELIER's avatar Maxime DESMARCHELIER
Parcourir les fichiers

Add dockerised backend

parent e279d1a8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -18,3 +18,22 @@ services: ...@@ -18,3 +18,22 @@ services:
- "6379:6379" - "6379:6379"
redis-client: redis-client:
build: ./redis build: ./redis
depends_on:
- redis
sg-backend:
build: ./sg-backend
command: sh -c "/wait && uvicorn main:app --reload --host 0.0.0.0"
environment:
- FRONTEND_URL="http://localhost"
- NEO4J_URI=neo4j://database:7687
- NEO4J_USER=neo4j
- NEO4J_PASSWORD=test
- WAIT_HOSTS=database:7474
- WAIT_HOSTS_TIMEOUT=300
- WAIT_SLEEP_INTERVAL=10
- WAIT_HOST_CONNECT_TIMEOUT=30
depends_on:
- database
- redis
ports:
- "8000:8000"
\ No newline at end of file
FROM python:latest
COPY ./* .
RUN pip3 install -r requirements.txt
EXPOSE 8000
ENV WAIT_VERSION 2.7.2
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
RUN chmod +x /wait
...@@ -22,7 +22,7 @@ origins = [ ...@@ -22,7 +22,7 @@ origins = [
app.add_middleware( app.add_middleware(
CORSMiddleware, CORSMiddleware,
allow_origins=origins, allow_origins=['*'],
allow_credentials=True, allow_credentials=True,
allow_methods=["*"], allow_methods=["*"],
allow_headers=["*"], allow_headers=["*"],
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter