Skip to content

Commit

Permalink
🐛 Fix Unnaccessible Routes in docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachid F committed Jan 31, 2024
1 parent 3658fa2 commit 6269ff4
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ redis-data
redis_data
.env
.DS_Store
.pnpm-store/
.pnpm-store/
docker-compose.source.yml
docker-compose.dev.yml
2 changes: 2 additions & 0 deletions apps/frontend-snippet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ FROM nginx:stable-alpine as runner
#ENV VITE_BACKEND_DOMAIN="$VITE_BACKEND_DOMAIN"
#ENV VITE_FRONTEND_DOMAIN="$VITE_FRONTEND_DOMAIN"
COPY --from=installer ./app/apps/frontend-snippet/dist/ /usr/share/nginx/html
COPY apps/frontend-snippet/nginx.conf /etc/nginx/conf.d/default.conf


EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
13 changes: 13 additions & 0 deletions apps/frontend-snippet/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is an Nginx config file that gets imported inside the FrontEnd Snippet production Dockerfile

server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;

}
}
6 changes: 6 additions & 0 deletions apps/webapp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,11 @@ FROM nginx:stable-alpine as runner
#ENV VITE_FRONTEND_DOMAIN="$VITE_FRONTEND_DOMAIN"
COPY --from=installer ./app/apps/webapp/dist/ /usr/share/nginx/html

RUN echo "***********************"
RUN cat /etc/nginx/conf.d/default.conf
RUN echo "***********************"

COPY apps/webapp/nginx.conf /etc/nginx/conf.d/default.conf

EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
13 changes: 13 additions & 0 deletions apps/webapp/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is an Nginx config file that gets imported inside the Webapp production Dockerfile

server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;

}
}
4 changes: 2 additions & 2 deletions docs/crm/deals/api/update.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Update a Deal"
description: "Update a Deal in any CRM Platform using this endpoint"
openapi: "PATCH /crm/deals"
---
openapi: "PATCH /crm/deals/{id}"
---
2 changes: 1 addition & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
},
{
"group": "Notes",
"pages": [ "crm/notes/overview", "crm/notes/api/list", "crm/notes/api/get", "crm/notes/api/create", "crm/notes/api/update" ]
"pages": [ "crm/notes/overview", "crm/notes/api/list", "crm/notes/api/get", "crm/notes/api/create" ]
},
{
"group": "Engagements",
Expand Down
2 changes: 1 addition & 1 deletion docs/open-source/contributors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cp .env.example .env

<Step title="Removed previously installed dependencies">
```bash
rm -rf node_modules .pnpm_store ./packages/api/dist ./packages/api/node_modules ./apps/webapp/node_modules ./apps/frontend_snippet/node_modules
rm -rf node_modules .pnpm-store ./packages/api/dist ./packages/api/node_modules ./apps/webapp/node_modules ./apps/frontend_snippet/node_modules
```
</Step>

Expand Down
16 changes: 8 additions & 8 deletions packages/api/scripts/docker-compose-build-from-sources.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# this docker compose is for development purposes.
# use it to build locally instead of pulling pre-build images from cloud
# use it to build locally instead of pulling pre-build images from cloud

name: panora
version: '3.8'
Expand Down Expand Up @@ -29,7 +29,7 @@ services:
build:
context: ./
dockerfile: ./packages/api/Dockerfile
environment:
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false
DISTRIBUTION: ${DISTRIBUTION}
JWT_SECRET: ${JWT_SECRET}
Expand All @@ -56,7 +56,7 @@ services:
condition: service_healthy
networks:
- backend

redis:
image: "redis:7.2.3-alpine"
container_name: "Redis"
Expand All @@ -66,7 +66,7 @@ services:
- ./redis-data:/data
networks:
- backend

webapp:
build:
dockerfile: ./apps/webapp/Dockerfile
Expand All @@ -83,7 +83,7 @@ services:
networks:
- backend
- frontend

magic-link-frontend:
build:
dockerfile: ./apps/frontend-snippet/Dockerfile
Expand All @@ -97,7 +97,7 @@ services:
networks:
- backend
- frontend

panora-store:
image: minio/minio
container_name: panora-store
Expand Down Expand Up @@ -134,7 +134,7 @@ services:
echo "****3****" &&
mc admin policy attach panora-store readwrite --user ${BUCKET_TCG_ATTACHMENTS_USER} &&
echo "****4****" &&
mc ls panora-store
mc ls panora-store
"
depends_on:
- postgres
Expand All @@ -146,4 +146,4 @@ networks:
backend:

volumes:
pnr-objstr:
pnr-objstr:

0 comments on commit 6269ff4

Please sign in to comment.