Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM node:20-slim as build
FROM docker://node:20-slim as build
WORKDIR /app
# Copy package files
COPY package*.json ./
Expand All @@ -11,7 +11,7 @@ COPY . .
RUN npm run build

# Production stage
FROM nginx:alpine
FROM docker://nginx:alpine
# Copy the built assets from build stage
COPY --from=build /app/dist /usr/share/nginx/html
# Expose port 80
Expand Down
29 changes: 7 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,36 @@ services:
build:
context: ./server
dockerfile: Dockerfile
depends_on:
- mongodb
ports:
- "8000:8000"
networks:
- app-network
depends_on:
- mongodb
environment:
- MONGODB__DATABASE_NAME=quickgraph
- MONGODB__URI=mongodb://root:example@mongodb:27017
- AUTH__SECRET_KEY=example

client:
image: quickgraph-client
ports:
- "3000:80"
build:
context: ./client
dockerfile: Dockerfile
ports:
- "8080:80"
depends_on:
- server
- docs
networks:
- app-network
environment:
- VITE_API_BASE_URL=http://localhost:8000/api
- VITE_DOC_BASE_URL=http://localhost:4000

mongodb:
image: mongo:latest
ports:
- "27018:27017"
image: docker.io/mongo:latest
volumes:
- mongodb_data:/data/db
- mongodb_data:/data/db:z
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=example
networks:
- app-network

docs:
build:
Expand All @@ -51,13 +43,11 @@ services:
- "4000:4000"
volumes:
- static_img:/app/static/img
networks:
- app-network
depends_on:
- init-static-img

init-static-img:
image: curlimages/curl:latest
image: docker.io/curlimages/curl:latest
user: root
volumes:
- static_img:/app/static/img
Expand Down Expand Up @@ -91,11 +81,6 @@ services:
chmod -R 755 /app/static/img &&
echo "Initialization complete"
'

volumes:
mongodb_data:
static_img:

networks:
app-network:
driver: bridge
2 changes: 1 addition & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-slim
FROM docker://python:3.10-slim

WORKDIR /app

Expand Down