Skip to content

Commit

Permalink
fix: Missing glibc (#29)
Browse files Browse the repository at this point in the history
* fix: Missing glibc using debian slim image

* feat: docker compose + Dockerfile using alpine

* fix: Delete gcompat

* fix: Install libstdc++ and gcompat at the end

* chore: Clean up run apk update and add

* fix: Avoid using alpine-pkg-glibc

* chore: Avoid installing curl
  • Loading branch information
kevinszuchet authored Jan 8, 2025
1 parent d48f6ed commit 517f813
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

FROM node:18-alpine as builderenv
FROM node:18-alpine AS builderenv

WORKDIR /app

Expand All @@ -18,10 +18,12 @@ RUN yarn install --prod --frozen-lockfile

FROM node:18-alpine

RUN apk update && apk add --no-cache wget tini
RUN apk update && \
apk add --no-cache wget tini libstdc++ gcompat && \
rm -rf /var/cache/apk/*

# NODE_ENV is used to configure some runtime options, like JSON logger
ENV NODE_ENV production
ENV NODE_ENV=production

ARG COMMIT_HASH=local
ENV COMMIT_HASH=${COMMIT_HASH:-local}
Expand Down
35 changes: 35 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
services:
postgres:
image: postgres:latest
container_name: postgres-local
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: social_service_ea
ports:
- '5432:5432'
volumes:
- postgres-data:/var/lib/postgresql/data

redis:
image: redis:latest
container_name: redis-local
ports:
- '6379:6379'

app:
image: social-service-ea:local
build:
context: .
dockerfile: Dockerfile
environment:
PG_COMPONENT_PSQL_CONNECTION_STRING: 'postgresql://postgres:postgres@postgres:5432/social_service_ea'
REDIS_HOST: 'redis'
ports:
- '3000:3000'
depends_on:
- postgres
- redis

volumes:
postgres-data:

0 comments on commit 517f813

Please sign in to comment.