Skip to content

Commit

Permalink
Fix: Issues with dockerfile and container networks in compose
Browse files Browse the repository at this point in the history
  • Loading branch information
ChakshuGautam committed Jul 20, 2022
1 parent d778fd1 commit 2483fe9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
2 changes: 2 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN yarn install
# RUN npx prisma generate

COPY . .
RUN ls -lah

RUN yarn run build

Expand All @@ -24,6 +25,7 @@ COPY --from=builder /app/package.json ./
COPY --from=builder /app/yarn.lock ./
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/prisma ./prisma
RUN ls ./prisma

EXPOSE 3000
CMD [ "npm", "run", "start:prod" ]
2 changes: 2 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ $ yarn install

Postman can send gRPC requests now. This can be used to test the gRPC server. It doesn't allow to share though.
![grpc.png](./images/grpc.png)

## Deployment status
32 changes: 16 additions & 16 deletions api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
templaterdb:
container_name: templaterdb
templaterDb:
container_name: templaterDb
image: postgres:12
ports:
- '${POSTGRES_HOST}:5432'
Expand All @@ -13,25 +13,25 @@ services:
volumes:
- ./pgdata:/var/lib/postgresql/data

gql:
image: ${HASURA_VERSION}
ports:
- '10022:8080'
depends_on:
- templaterdb
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://${DB_USERNAME}:${DB_PASSWORD}@templaterdb:5432/${DB_NAME}
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set to "false" to disable console
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_ADMIN_PASS}
# gql:
# image: ${HASURA_VERSION}
# ports:
# - '10022:8080'
# depends_on:
# - templaterdb
# restart: always
# environment:
# HASURA_GRAPHQL_DATABASE_URL: postgres://${DB_USERNAME}:${DB_PASSWORD}@templaterdb:5432/${DB_NAME}
# HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set to "false" to disable console
# HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
# HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_ADMIN_PASS}

templater:
image: samagragovernance/templater:latest
image: sha256:a8e39ea135548eacb2d6277d6a67d9e36d0da2d1130042bc6eff6646e7e1854b
ports:
- '3007:3000'
depends_on:
- templaterdb
- templaterDb
restart: always
environment:
DATABASE_URL: ${DATABASE_URL}

0 comments on commit 2483fe9

Please sign in to comment.