-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
66 lines (62 loc) · 1.66 KB
/
docker-compose.yaml
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
version: '3.7'
services:
ecommerce:
build:
context: ./backend
dockerfile: Dockerfile
image: ecommerce:1.0
container_name: ecommerce
environment:
- PORT=3000
- DATABASE_URL=jdbc:postgresql://postgres:5432/ecommerce
- DATABASE_USERNAME=ecommerce
- DATABASE_PASSWORD=ecommerce
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=admin
- APPLICATION_JWT_SECRET=ecommerce-secret
- APPLICATION_JWT_EXPIRE_TIME=5
- APP_EMAIL_MAIN_EMAIL=${APP_EMAIL_MAIN_EMAIL}
- APP_EMAIL_MAIN_PASSWORD=${APP_EMAIL_MAIN_PASSWORD}
- APP_EMAIL_NOTIFY_EMAIL=${APP_EMAIL_NOTIFY_EMAIL}
- APP_S3_IMAGE_BUCKET_NAME=${APP_S3_IMAGE_BUCKET_NAME}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
ports:
- 3000:3000
restart: unless-stopped
networks:
- ecommerce_network
ecommerce-front:
build:
context: ./frontend
dockerfile: Dockerfile
image: ecommerce-front:1.0
container_name: ecommerce_front
ports:
- 3001:80
restart: unless-stopped
networks:
- ecommerce_network
postgres:
image: postgres:12.9
container_name: ecommerce_postgres
environment:
- POSTGRES_USER=ecommerce
- POSTGRES_PASSWORD=ecommerce
- POSTGRES_DB=ecommerce
- PGUSER=ecommerce
- PGPASSWORD=ecommerce
- PGDATA=/var/lib/postgresql/data/
restart: unless-stopped
ports:
- 5432:5432
networks:
- ecommerce_network
volumes:
- ./data:/var/lib/postgresql/data
networks:
ecommerce_network:
ipam:
driver: default
config:
- subnet: 172.99.0.0/16