# This file defines how to run your application container. # It specifies the build context, port mappings, and environment variables. version: '3.8' services: web: # 'build: .' tells Docker Compose to look for the Dockerfile in the current directory. build: . # The name for the running container. container_name: swapstation_app # Restart the container automatically if it stops. restart: always # Map port 80 on the host (the AWS server) to port 80 in the container (where Nginx is listening). ports: - "80:80" # This section tells Docker Compose to read environment variables from a file named '.env'. # This is how you will pass your secrets and configuration to the application. env_file: - .env