Skip to content

Commit

Permalink
chore: remove arguments in the Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
huynguyen-hl committed Jun 11, 2024
1 parent 8ca7b7e commit 194473a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
24 changes: 0 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,6 @@ FROM node:20-alpine as vckit-api

WORKDIR /app

# Default arguments for environment variables
ARG DATABASE_TYPE=postgres
ARG DATABASE_USERNAME=postgres
ARG DATABASE_PASSWORD=postgres
ARG DATABASE_NAME=vckit
ARG DATABASE_HOST=localhost
ARG DATABASE_PORT=5432
ARG DATABASE_ENCRYPTION_KEY=29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c
ARG PORT=3332
ARG PROTOCOL=http
ARG API_DOMAIN=localhost:3332

# Set environment variables
ENV DATABASE_TYPE=${DATABASE_TYPE}
ENV DATABASE_USERNAME=${DATABASE_USERNAME}
ENV DATABASE_PASSWORD=${DATABASE_PASSWORD}
ENV DATABASE_NAME=${DATABASE_NAME}
ENV DATABASE_HOST=${DATABASE_HOST}
ENV DATABASE_PORT=${DATABASE_PORT}
ENV DATABASE_ENCRYPTION_KEY=${DATABASE_ENCRYPTION_KEY}
ENV PORT=${PORT}
ENV PROTOCOL=${PROTOCOL}
ENV API_DOMAIN=${API_DOMAIN}

RUN apk update && apk add
# Update package lists and install gettext and git
RUN apk update && \
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ services:
vckit-api:
build:
context: .
args:
DATABASE_HOST: db
env_file:
- local.env
ports:
- 3332:3332
depends_on:
Expand Down
10 changes: 10 additions & 0 deletions local.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
DATABASE_HOST=db
DATABASE_TYPE=postgres
DATABASE_USERNAME=postgres
DATABASE_PASSWORD=postgres
DATABASE_NAME=vckit
DATABASE_PORT=5432
DATABASE_ENCRYPTION_KEY=29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c
PORT=3332
PROTOCOL=http
API_DOMAIN=localhost:3332

0 comments on commit 194473a

Please sign in to comment.