-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (53 loc) · 1.74 KB
/
docker-compose.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This file is provided with comments on all the tags at their first appearance
# This defines the syntax version of docker-compose.yml
version: "3.9"
# Services defines all different containers.
services:
# All this tags the container with the name "seaqull-frontend"
seaqull-frontend:
# Path to directory with Dockerfile
build: ./frontend
# Restart setting in case of container downtime or crash
restart: always
# Expose ports in virtual network and local machine
ports:
- "80:80"
# Defines which networks this container should be part of
networks:
- application-bridge
# This tag states that this container should only be started when the containers defined here have been started.
# WARNING: It does not prevent this container from running before the containers defined below.
depends_on:
- "seaqull-backend"
- "seaqull-db"
seaqull-backend:
build: ./backend
restart: always
# Exposing this ports makes port available to containers within the same network at the time of building (instead of at the time of running)
expose:
- "8000"
ports:
- "8000:8000"
# Defines a file with environment variables for this container
env_file:
- './backend/.env'
networks:
- application-bridge
depends_on:
- "seaqull-db"
seaqull-db:
# This pulls an image called postgres from hub.docker.com, alternative to the build tag.
image: postgres
restart: always
expose:
- "5432"
ports:
- "5432:5432"
env_file:
- "./.env"
networks:
- application-bridge
# This defines the networks that are required by the services
networks:
# The tag here is the name of the network.
application-bridge: