Skip to content

Commit

Permalink
Dockerfile Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
R1c4rdCo5t4 committed Jul 9, 2024
1 parent cb7b2db commit fbcc750
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
5 changes: 3 additions & 2 deletions code/server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
version: 'latest'

services:
postgres-db:
container_name: notespace-postgres-db
build:
context: .
dockerfile: ./docker/Dockerfile-db
dockerfile: Dockerfile
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- 5432:5432
- "5432:5432"
13 changes: 3 additions & 10 deletions code/server/docker/Dockerfile-db
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
FROM postgres

USER postgres
WORKDIR /app

ENV POSTGRES_USER=${POSTGRES_USER}
ENV POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ENV POSTGRES_DB=${POSTGRES_DB}

COPY sql/create_tables.sql /docker-entrypoint-initdb.d/1_create-schema.sql

COPY --chown=postgres:postgres ./docker/scripts/wait-for-postgres.sh ./bin/wait-for-postgres.sh
RUN chmod +x ./bin/wait-for-postgres.sh
COPY --chown=postgres:postgres ./docker/scripts/wait-for-postgres.sh /usr/local/bin/wait-for-postgres.sh
RUN chmod +x /usr/local/bin/wait-for-postgres.sh

EXPOSE 5432
EXPOSE 5432
2 changes: 1 addition & 1 deletion code/server/render.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
- name: postgres-db
type: web
type: worker
env: docker
plan: standard
dockerCommand: docker-compose up
Expand Down

0 comments on commit fbcc750

Please sign in to comment.