chore: i think the docker should now build

This commit is contained in:
Rotimi Best
2024-09-20 09:10:05 +01:00
parent 5438d9acf1
commit 4199fce976
3 changed files with 24 additions and 12 deletions
+9 -5
View File
@@ -9,14 +9,18 @@ const getSupabase = (config) => {
config = {
supabaseConfig: {
url: PUBLIC_SUPABASE_URL || '',
anonKey: PUBLIC_SUPABASE_ANON_KEY || ''
url: PUBLIC_SUPABASE_URL,
anonKey: PUBLIC_SUPABASE_ANON_KEY
}
};
supabase = createClient(config.supabaseConfig.url, config.supabaseConfig.anonKey, {
auth: { persistSession: false }
});
try {
supabase = createClient(config.supabaseConfig.url, config.supabaseConfig.anonKey, {
auth: { persistSession: false }
});
} catch (error) {
console.error('Error starting supabase', error)
}
return supabase;
};
+10 -5
View File
@@ -1,3 +1,5 @@
FROM node:18
WORKDIR "/app"
@@ -7,14 +9,17 @@ RUN npm install -g pnpm
COPY ./package.json ./
COPY ./pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
RUN pnpm i --frozen-lockfile
COPY . /app/
CMD [ "ls", "-la" ]
CMD [ "cd", "apps/dashboard" ]
CMD [ "pnpm", "build" ]
WORKDIR "/app/apps/dashboard"
RUN pnpm i --frozen-lockfile
RUN pnpm build
EXPOSE 5000
CMD [ "pnpm", "start" ]
CMD ["ls", "-la"]
CMD ["pnpm", "start"]
# CMD [ "sh", "-c", "ls -la && cd apps/dashboard && pnpm build && pnpm start" ]
+5 -2
View File
@@ -34,10 +34,13 @@ services:
dashboard:
build:
dockerfile: ./apps/dashboard/Dockerfile
context: .
context: ./
volumes:
- .:/app
- /app/node_modules
- /app/apps/dashboard/node_modules
# command: sh -c "npm install -g pnpm && rm -rf node_modules && yes | pnpm install --frozen-lockfile && cd apps/dashboard && pnpm build && pnpm start"
environment:
- NODE_ENV=production
- IS_SELFHOSTED=true
# Supabase - Database
- PUBLIC_SUPABASE_URL=${PUBLIC_SUPABASE_URL}