created root docker compose (progress)
This commit is contained in:
parent
de9832c903
commit
d4b2a3057a
|
|
@ -1,37 +1,12 @@
|
|||
services:
|
||||
db:
|
||||
image: postgres:15
|
||||
restart: unless-stopped
|
||||
env_file: ./.env.development
|
||||
environment:
|
||||
POSTGRES_DB: $DB_NAME
|
||||
POSTGRES_USER: $DB_USER
|
||||
POSTGRES_PASSWORD: $DB_PASSWORD
|
||||
postgres:
|
||||
image: postgres:14-alpine
|
||||
container_name: postgres14
|
||||
ports:
|
||||
- $DB_PORT:$DB_PORT
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db_data:/var/lib/postgresql/data
|
||||
|
||||
app-dev:
|
||||
image: node:20-alpine
|
||||
restart: unless-stopped
|
||||
env_file: ./.env.development
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
ports:
|
||||
- '$NODE_LOCAL_PORT:$NODE_DOCKER_PORT'
|
||||
- ~/apps/postgres:/var/lib/postgresql/data
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
DB_HOST: db
|
||||
DB_PORT: $DB_PORT
|
||||
DB_NAME: $DB_NAME
|
||||
DB_USER: $DB_USER
|
||||
DB_PASS: $DB_PASSWORD
|
||||
command: sh -c "npm install && npm run dev"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: bullpen-dev
|
||||
|
|
|
|||
Loading…
Reference in New Issue