For Frontend practice
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: webstore_db_prod
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- postgres_data_prod:/var/lib/postgresql/data
|
||||
|
||||
api:
|
||||
image: webstore-api:prod
|
||||
container_name: webstore_api_prod
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- .production.env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
PORT: ${PORT}
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
|
||||
COOKIE_NAME: ${COOKIE_NAME}
|
||||
COOKIE_SECURE: ${COOKIE_SECURE}
|
||||
command: sh -c "npm run prisma:generate && npm run prisma:push && npm run prisma:seed && npm start"
|
||||
ports:
|
||||
- "${API_PORT:-3000}:3000"
|
||||
|
||||
volumes:
|
||||
postgres_data_prod:
|
||||
Reference in New Issue
Block a user