Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment #5

Merged
merged 2 commits into from
Feb 26, 2024
Merged
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: 0 additions & 4 deletions .github/workflows/ssh-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
push: true
tags: |
ghcr.io/dmytro-komlyk/prod-fixlab-server:latest
build-args: |
APP_HOST=${{ secrets.SERVER_HOST }}

- name: "Build Client"
if: contains(github.event.pull_request.labels.*.name, 'frontend-client')
Expand All @@ -53,7 +51,6 @@ jobs:
ghcr.io/dmytro-komlyk/prod-fixlab-client:latest
build-args: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
APP_HOST=${{ secrets.SERVER_HOST }}

- name: "Build Admin"
if: contains(github.event.pull_request.labels.*.name, 'frontend-admin')
Expand All @@ -66,4 +63,3 @@ jobs:
ghcr.io/dmytro-komlyk/prod-fixlab-admin:latest
build-args: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
APP_HOST=${{ secrets.SERVER_HOST }}
14 changes: 7 additions & 7 deletions apps/admin/.env.docker.local.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
APP_PORT=3002
NEXT_PUBLIC_APP_HOST=
NEXT_PUBLIC_BASE_URL="http://${NEXT_PUBLIC_APP_HOST}:3002"
NEXT_PUBLIC_SERVER_URL="http://${NEXT_PUBLIC_APP_HOST}:3000"
NEXT_PUBLIC_DOCKER_SERVICE_URL="http://server:3000"
NEXT_PUBLIC_SERVER_API_URL="http://${NEXT_PUBLIC_APP_HOST}:3000/api"
NEXT_PUBLIC_SERVER_TRPC_URL="http://${NEXT_PUBLIC_APP_HOST}:3000/api/trpc"

NEXT_PUBLIC_BASE_URL=http://185.65.244.84:3002
NEXT_PUBLIC_SERVER_URL=http://185.65.244.84:3000
NEXT_PUBLIC_DOCKER_SERVICE_URL=http://server:3000
NEXT_PUBLIC_SERVER_API_URL=http://185.65.244.84:3000/api
NEXT_PUBLIC_SERVER_TRPC_URL=http://185.65.244.84:3000/api/trpc
NEXTAUTH_SECRET=
NEXTAUTH_URL="http://${NEXT_PUBLIC_APP_HOST}:3002/api/auth"
NEXTAUTH_URL=http://185.65.244.84:3002/api/auth
NEXTAUTH_JWT_ACCESS_TOKEN_EXPIRATION='1d'

# This was inserted by `prisma init`:
Expand Down
3 changes: 0 additions & 3 deletions apps/admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG NODE_VERSION=18
ARG APP_HOST
ARG DATABASE_URL

FROM --platform=linux/amd64 node:${NODE_VERSION}-alpine3.17 as base
Expand Down Expand Up @@ -34,7 +33,6 @@ COPY --from=dependencies /app/apps/server/node_modules ./apps/server/node_module
COPY ${SERVICE_PATH}/.env.docker.local.example ./${SERVICE_PATH}/.env.local

ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_PUBLIC_APP_HOST=${APP_HOST}

RUN pnpm db:generate
RUN pnpm build:${PACKAGE_NAME}
Expand Down Expand Up @@ -62,7 +60,6 @@ WORKDIR /app/${SERVICE_PATH}
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV=production
ENV DATABASE_URL=${DATABASE_URL}
ENV NEXT_PUBLIC_APP_HOST=${APP_HOST}

USER nextjs

Expand Down
8 changes: 4 additions & 4 deletions apps/client/.env.docker.local.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
APP_PORT=3001
NEXT_PUBLIC_APP_HOST=
NEXT_PUBLIC_BASE_URL="http://${NEXT_PUBLIC_APP_HOST}:3001"
NEXT_PUBLIC_SERVER_URL="http://${NEXT_PUBLIC_APP_HOST}:3000"
NEXT_PUBLIC_SERVER_TRPC_URL="http://${NEXT_PUBLIC_APP_HOST}:3000/api/trpc"

NEXT_PUBLIC_BASE_URL=http://185.65.244.84:3001
NEXT_PUBLIC_SERVER_URL=http://185.65.244.84:3000
NEXT_PUBLIC_SERVER_TRPC_URL=http://185.65.244.84:3000/api/trpc
NEXT_PUBLIC_TELEGRAM_TOKEN=
NEXT_PUBLIC_TELEGRAM_CHAT_ID=
NEXT_PUBLIC_TWANK_PROPERTY_ID=
Expand Down
3 changes: 0 additions & 3 deletions apps/client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG NODE_VERSION=18
ARG APP_HOST
ARG DATABASE_URL

FROM --platform=linux/amd64 node:${NODE_VERSION}-alpine3.17 as base
Expand Down Expand Up @@ -35,7 +34,6 @@ COPY ${SERVICE_PATH}/.env.docker.local.example ./${SERVICE_PATH}/.env.local

ENV NEXT_TELEMETRY_DISABLED 1
ENV NEXT_SHARP_PATH=/app/${SERVICE_PATH}/node_modules/sharp
ENV NEXT_PUBLIC_APP_HOST=${APP_HOST}

RUN pnpm db:generate
RUN pnpm build:${PACKAGE_NAME}
Expand Down Expand Up @@ -64,7 +62,6 @@ WORKDIR /app/${SERVICE_PATH}
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED 1
ENV DATABASE_URL=${DATABASE_URL}
ENV NEXT_PUBLIC_APP_HOST=${APP_HOST}

USER nextjs

Expand Down
5 changes: 2 additions & 3 deletions apps/server/.env.docker.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
## application port, default 4000
APP_PORT=3000
APP_HOST=
APP_API=api
APP_TRPC=trpc
APP_SWAGER=api-docs
APP_STATIC_ASSETS=public
APP_BASE_URL=http://${APP_HOST}:3000
APP_ADMIN_URL=http://${APP_HOST}:3002
APP_BASE_URL=http://185.65.244.84:3000
APP_ADMIN_URL=http://185.65.244.84:3002

# This was inserted by `prisma init`:
# Environment variables declared in this file are automatically made available to Prisma.
Expand Down
3 changes: 0 additions & 3 deletions apps/server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG NODE_VERSION=18
ARG APP_HOST

FROM --platform=linux/amd64 node:${NODE_VERSION}-alpine3.17 as base

Expand Down Expand Up @@ -29,7 +28,6 @@ COPY --from=dependencies /app/${SERVICE_PATH}/node_modules ./${SERVICE_PATH}/nod
COPY ${SERVICE_PATH}/.env.docker.example ./${SERVICE_PATH}/.env

ENV NODE_ENV production
ENV APP_HOST=${APP_HOST}

RUN pnpm db:generate
RUN pnpm build:server
Expand All @@ -49,7 +47,6 @@ WORKDIR /app/${SERVICE_PATH}
USER node

ENV NODE_ENV=production
ENV APP_HOST=${APP_HOST}
ENV PORT 3000
ENV HOSTNAME 0.0.0.0
EXPOSE 3000
Expand Down
Loading