-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (32 loc) · 1.11 KB
/
docker-compose.yml
File metadata and controls
38 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
services: # Start with this tag. This will contain all the containers you want to run
postgres: # For each container, define the block name. Can be anything, but should match the name of the container
container_name: postgres # Name of the container
image: postgres:latest # If you want to use published Docker image, then use this tag to specify
restart: always # Restart the container if it stops
environment: # Environment variables to be passed to the container
POSTGRES_USER: stock
POSTGRES_PASSWORD: stock
ports: # Ports to be exposed to the host machine
- "5432:5432"
frontend:
build: # Build the image from the Dockerfile
context: ./client # Path to the Dockerfile
dockerfile: Dockerfile # Name of the Dockerfile
container_name: frontend
ports:
- '80:3000'
restart: always
redis:
container_name: redis
image: redis:latest
restart: always
ports:
- '6379:6379'
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: backend
ports:
- "5000:5000"
restart: always