51 lines
950 B
YAML
51 lines
950 B
YAML
version: '3'
|
|
|
|
services:
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
container_name: frontend
|
|
restart: always
|
|
|
|
backend:
|
|
build: ./backend
|
|
container_name: backend
|
|
restart: always
|
|
environment:
|
|
DB_HOST: postgres
|
|
DB_NAME: smartshare
|
|
DB_USER: postgres
|
|
DB_PASSWORD: postgres123
|
|
volumes:
|
|
- ./uploads:/app/uploads
|
|
depends_on:
|
|
- postgres
|
|
|
|
postgres:
|
|
image: postgres:15
|
|
container_name: postgres
|
|
restart: always
|
|
environment:
|
|
POSTGRES_DB: smartshare
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres123
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
nginx:
|
|
image: nginx:latest
|
|
container_name: nginx
|
|
restart: always
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
|
- ./ssl:/etc/nginx/ssl
|
|
depends_on:
|
|
- frontend
|
|
- backend
|
|
|
|
volumes:
|
|
postgres_data:
|