-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-production.yml
More file actions
19 lines (18 loc) · 1009 Bytes
/
Copy pathdocker-compose-production.yml
File metadata and controls
19 lines (18 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
version: '3.8'
# Specifies the version of the Docker Compose file syntax.
services:
# Defines the services, their configuration, and how they interact.
app:
# The 'app' service definition, describing how to build and run your application container.
build:
# Instructions for building the Docker image.
context: . # Specifies the build context location, which is the current directory.
dockerfile: Dockerfile # Specifies the Dockerfile to use for building the image.
ports:
- '5001:5001' # Maps port 5001 on the host to port 5001 in the container, allowing external access.
env_file:
- .env.production # Specifies the environment file that contains the production environment variables.
restart: always
# Configures the restart policy to always restart the container if it stops.
environment:
- NODE_ENV=production # Sets the NODE_ENV environment variable to 'production'.