-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
89 lines (85 loc) · 2.31 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: "3.8"
services:
frontend:
restart: always
image: 42-node
build:
context: ./
dockerfile: Dockerfile.42-node
volumes:
- ./frontend/:/app
- ./shared/:/shared
environment:
- NODE_ENV=${NODE_ENV-development}
- VUE_APP_BACKEND_SERVER_URI=${BACKEND_SERVER_URI}
ports:
- 8080:8080
networks:
- mynet
command: sh -c 'npm install && npm run serve'
backend:
restart: always
image: 42-node
depends_on:
- postgres
environment:
- ACCESS_TOKEN_SECRET=${ACCESS_TOKEN_SECRET}
- ACCESS_TOKEN_EXPIRATION=${ACCESS_TOKEN_EXPIRATION}
- REFRESH_TOKEN_SECRET=${REFRESH_TOKEN_SECRET}
- REFRESH_TOKEN_EXPIRATION=${REFRESH_TOKEN_EXPIRATION}
- BACKEND_SERVER_URI=${BACKEND_SERVER_URI}
- OAUTH_REDIRECT_URI=${OAUTH_REDIRECT_URI}
- FORTY_TWO_CLIENT_ID=${FORTY_TWO_CLIENT_ID}
- FORTY_TWO_SECRET=${FORTY_TWO_SECRET}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_SECRET=${GOOGLE_SECRET}
- POSTGRES_HOST=postgres
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
# - TYPEORM_LOGGING=true
# - TYPEORM_SYNCHRONIZE=true
# - DEBUG=*
- NODE_ENV=${NODE_ENV-development}
volumes:
- ./backend/:/app
- ./shared/:/shared
ports:
- 3000:3000
- 9229:9229
networks:
- mynet
# mynet:
# aliases:
# - ${DOMAIN}
# command: sh -c 'npm install && npm run start:dev'
command: sh -c 'npm install && npm run start:debug'
postgres:
restart: always
image: postgres:14-alpine3.15
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- PGPORT= ${POSTGRES_PORT}
ports:
- 5432:${POSTGRES_PORT}
networks:
- mynet
volumes:
- ./postgres_initdb/:/docker-entrypoint-initdb.d/
# UI for postgres -> https://hub.docker.com/r/dpage/pgadmin4
pgadmin:
restart: always
image: dpage/pgadmin4
logging:
driver: "none"
ports:
- 8081:80
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
networks:
- mynet
networks:
mynet: