chore: Move and update the Dockerfile for the database configuration

This commit is contained in:
Keisuke Hirata 2024-08-20 23:10:46 +09:00
parent 2a1bbb4a8b
commit 2727a08b0f
4 changed files with 10 additions and 3 deletions

View File

@ -1,8 +1,8 @@
services: services:
frontend: frontend:
build: build:
context: . context: ./
dockerfile: ./Dockerfile dockerfile: ./docker/app.Dockerfile
environment: environment:
- PORT=${WEB_PORT} - PORT=${WEB_PORT}
ports: ports:
@ -14,9 +14,13 @@ services:
- ./tsconfig.json:/app/tsconfig.json - ./tsconfig.json:/app/tsconfig.json
- ./svelte.config.js:/app/svelte.config.js - ./svelte.config.js:/app/svelte.config.js
db: db:
image: postgres:16 build:
context: ./
dockerfile: ./docker/postgres.Dockerfile
environment: environment:
- POSTGRES_PASSWORD=${PG_PASS} - POSTGRES_PASSWORD=${PG_PASS}
- POSTGRES_USER=${PG_USER}
- POSTGRES_DB=${PG_DB}
ports: ports:
- ${PG_PORT}:5432 - ${PG_PORT}:5432
volumes: volumes:

View File

View File

@ -0,0 +1,3 @@
FROM postgres:16
COPY ./docker/initdb.d/ /docker-entrypoint-initdb.d/