-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yaml
47 lines (46 loc) · 1.11 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
version: "3"
#
#volumes:
# db: # mount it internally instead of a folder. it avoids file lock problems
services:
api:
image: ducnguyen96/reddit-clone-apis:latest
container_name: reddit-apis
environment:
- AUTH_SECRET_KEY=rgrgTRGgz54rgGR465r4g
- DB_HOST=postgres
- DB_NAME=redditclone
- DB_USER=veryweirdname
- DB_PASSWORD=veryweirdpassword
- DB_PORT=5432
- TOKEN_EXPIRES_IN=72
ports:
- "5000:5000"
restart: always
depends_on:
- postgres
networks:
- reddit-network
volumes:
- /home/ducng948/reddit-clone/media:/media
- /home/ducng948/reddit-clone/server/ffmpeg.sh:/ffmpeg.sh
postgres:
image: postgres:14.0-alpine3.14
container_name: reddit-postgres
restart: always
environment:
POSTGRES_DB: redditclone
POSTGRES_USER: veryweirdname
POSTGRES_PASSWORD: veryweirdpassword
TZ: 'GMT'
PGTZ: 'GMT'
ports:
- '5432:5432'
volumes:
- ./database/:/var/lib/postgresql/data
networks:
- reddit-network
networks:
reddit-network:
external:
name: reddit-network