docker-compose, coolify-compose and .env.example
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
POSTGRES_USER=dev_user
|
||||
POSTGRES_PASSWORD=dev_password123
|
||||
POSTGRES_DB=dev_db
|
||||
@@ -0,0 +1,26 @@
|
||||
services:
|
||||
api:
|
||||
image: node:26-alpine
|
||||
working_dir: /app
|
||||
command: sh -c "npm install -g pnpm && pnpm install && pnpm start:dev"
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
environment:
|
||||
PORT: ${PORT:-3000}
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
postgres:
|
||||
image: postgres:18-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
node_modules:
|
||||
postgres_data:
|
||||
@@ -0,0 +1,28 @@
|
||||
services:
|
||||
api:
|
||||
image: node:26-alpine
|
||||
working_dir: /app
|
||||
command: sh -c "npm install -g pnpm && pnpm install && pnpm start:dev"
|
||||
ports:
|
||||
- "${PORT:-3000}:${PORT:-3000}"
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
environment:
|
||||
PORT: ${PORT:-3000}
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
postgres:
|
||||
image: postgres:18-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
node_modules:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user