38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
version: '3.9'
|
|
|
|
############################################################
|
|
# To Give the container a project related name run: #
|
|
# #
|
|
# docker-compose -p final-project up #
|
|
# #
|
|
# ⚠️ Make sure current directory is: /ProjectSourceCode ⚠️ #
|
|
############################################################
|
|
|
|
services:
|
|
db:
|
|
container_name: postgres-db
|
|
image: postgres:14
|
|
env_file: .env
|
|
ports:
|
|
- '5432:5432'
|
|
volumes:
|
|
- users-database:/var/lib/postgresql/data
|
|
- ./public/init_data:/docker-entrypoint-initdb.d
|
|
web:
|
|
container_name: node-web-interface
|
|
image: node:lts
|
|
user: 'node'
|
|
working_dir: /home/node/app
|
|
env_file: .env
|
|
environment:
|
|
- NODE_ENV=development
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- '3000:3000'
|
|
volumes:
|
|
- .:/home/node/app # Mount Client directory
|
|
- ./node_modules:/home/node/app/node_modules # Mount node_modules directory
|
|
command: 'npm run start'
|
|
volumes:
|
|
users-database: |