Skip to content

Commit

Permalink
Merge pull request #109 from panoratech/docker-compose-webapp
Browse files Browse the repository at this point in the history
✨ Webapp available in self-hosted distribution
  • Loading branch information
rflihxyz authored Dec 3, 2023
2 parents 899f074 + e06f824 commit dcb38af
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ POSTGRES_DB=panora_db
POSTGRES_HOST=postgres

JWT_SECRET=secret_jwt


OAUTH_REDIRECT_BASE=https://api-staging.panora.dev
ENCRYPT_CRYPTO_SECRET_KEY=selfhosted123
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ services:
- 3000:3000
depends_on:
- postgres

webapp:
build: ./packages/webapp
restart:
unless-stopped
ports:
- 1312:8080
depends_on:
- postgres
2 changes: 2 additions & 0 deletions packages/webapp/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
14 changes: 14 additions & 0 deletions packages/webapp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# build stage
FROM node:20-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist/ /usr/share/nginx/html
RUN ls -la /usr/share/nginx/html
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

0 comments on commit dcb38af

Please sign in to comment.