-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
74 lines (71 loc) · 1.9 KB
/
docker-compose.prod.yml
File metadata and controls
74 lines (71 loc) · 1.9 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
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
70
71
72
73
74
# specify docker file version
version: "3"
# define list of services
services:
frontend:
# define container name
container_name: frontend
# build container with dockerfile in frontend directory
build: ~/codeclash/codeclash-frontend
# restart on reboot or crash
restart: always
# define .env file
env_file:
- ~/codeclash/codeclash-frontend/.env
ports:
- 3000:3000
# specify container should start after backend
depends_on:
- backend
# define myportfolio service
backend:
container_name: backend
# define service will be built with dockerfile in current directory
build: ~/codeclash/codeclash-backend
# restart on reboot or error
restart: always
# define file containing enviornment variables
env_file:
- ~/codeclash/codeclash-backend/.env
ports:
- 8000:8000
# specify container should start after postgres service is up
depends_on:
- postgres
# define mysql service
postgres:
container_name: postgres
# lower resource usage than mysql
image: postgres
# restart on error or reboot
restart: always
# define file containing enviornemnt variables
env_file:
- ~/codeclash/codeclash-backend/.env
expose:
- 5432:5432
volumes:
- pgdata:/var/lib/postgres/data
# define nginx container
#nginx:
# container_name: nginx
#image: jonasal/nginx-certbot
#restart: always
# generates certificates
#environment:
#- CERTBOT_EMAIL=gino.rey@outlook.com
# bind ports to the internet
#ports:
#- 80:80
#- 443:443
# store certificate files in a volume
#volumes:
#- nginx_secrets:/etc/letsencrypt
# map config files into the container
#- ./user_conf.d:/etc/nginx/user_conf.d
#depends_on:
#- backend
# define a volume that will persist if containers are recreated
volumes:
pgdata:
#nginx_secrets: