42 lines
838 B
YAML
42 lines
838 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "80:80"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- NODE_ENV=production
|
|
# Add your environment variables here
|
|
# - REACT_APP_API_URL=http://api.example.com
|
|
restart: unless-stopped
|
|
networks:
|
|
- app-network
|
|
|
|
# Development service with hot reloading
|
|
frontend-dev:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.dev
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- .:/app
|
|
- /app/node_modules
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- NODE_ENV=development
|
|
# Add your development environment variables here
|
|
# - REACT_APP_API_URL=http://localhost:8000
|
|
command: npm start
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge |