Skip to content

Commit

Permalink
🐛 Docker: build all images from one file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachid F committed Dec 30, 2023
1 parent deb5465 commit c7551ab
Show file tree
Hide file tree
Showing 49 changed files with 105 additions and 1,506 deletions.
87 changes: 0 additions & 87 deletions .github/workflows/sh-build-push-docker-mac.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/sh-build-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: Build and push Frontend (Magic Links)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,darwin/amd64
context: .
file: ./apps/frontend-snippet/Dockerfile
push: true
Expand All @@ -41,6 +42,7 @@ jobs:
- name: Build and push Frontend (Dashboard)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,darwin/amd64
context: .
file: ./apps/webapp/Dockerfile
push: true
Expand All @@ -52,6 +54,7 @@ jobs:
- name: Build and push Backend (API)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7,darwin/amd64
context: .
file: ./packages/api/Dockerfile
push: true
Expand Down
102 changes: 102 additions & 0 deletions packages/api/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: panora
version: '3.8'

networks:
frontend:
backend:

services:
postgres:
image: postgres:16.1
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./pg_data:/var/lib/postgresql/data
- ./packages/api/scripts/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./packages/api/scripts/seed.sql:/docker-entrypoint-initdb.d/seed.sql
networks:
- backend

api:
build:
context: ./
dockerfile: ./packages/api/Dockerfile
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB}?ssl=false
DISTRIBUTION: ${DISTRIBUTION}
JWT_SECRET: ${JWT_SECRET}
REDIS_HOST: redis
HUBSPOT_CLIENT_ID: ${HUBSPOT_CLIENT_ID}
HUBSPOT_CLIENT_SECRET: ${HUBSPOT_CLIENT_SECRET}
ZOHOCRM_CLIENT_ID: ${ZOHOCRM_CLIENT_ID}
ZOHOCRM_CLIENT_SECRET: ${ZOHOCRM_CLIENT_SECRET}
PIPEDRIVE_CLIENT_ID: ${PIPEDRIVE_CLIENT_ID}
PIPEDRIVE_CLIENT_SECRET: ${PIPEDRIVE_CLIENT_SECRET}
ZENDESK_CLIENT_ID: ${ZENDESK_CLIENT_ID}
ZENDESK_CLIENT_SECRET: ${ZENDESK_CLIENT_SECRET}


restart:
unless-stopped
ports:
- 3000:3000
#command: cd /app/packages/api && node dist/src/main.js
depends_on:
postgres:
condition: service_healthy
networks:
- backend

redis:
image: "redis:7.2.3-alpine"
container_name: "Redis"
ports:
- "6379:6379"
volumes:
- ./redis-data:/data
networks:
- backend

webapp:
build:
dockerfile: ./apps/webapp/Dockerfile
context: ./
args:
VITE_BACKEND_DOMAIN: ${VITE_BACKEND_DOMAIN}
VITE_FRONTEND_DOMAIN: ${VITE_FRONTEND_DOMAIN}
restart:
unless-stopped
ports:
- 80:80
depends_on:
- api
networks:
- backend
- frontend

magic-link-frontend:
build:
dockerfile: ./apps/frontend-snippet/Dockerfile
context: ./
args:
VITE_BACKEND_DOMAIN: ${VITE_BACKEND_DOMAIN}
VITE_ML_FRONTEND_URL: ${VITE_FRONTEND_DOMAIN}

restart:
always
ports:
- 81:80
depends_on:
- api
networks:
- backend
- frontend
5 changes: 0 additions & 5 deletions website-docs/.docusaurus/DONT-EDIT-THIS-FOLDER

This file was deleted.

161 changes: 0 additions & 161 deletions website-docs/.docusaurus/client-manifest.json

This file was deleted.

6 changes: 0 additions & 6 deletions website-docs/.docusaurus/client-modules.js

This file was deleted.

1 change: 0 additions & 1 deletion website-docs/.docusaurus/codeTranslations.json

This file was deleted.

Loading

0 comments on commit c7551ab

Please sign in to comment.