-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
142 lines (134 loc) · 4.33 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
version: "3.8"
services:
backend:
build:
context: ./
dockerfile: ./docker/backend/dockerfile
container_name: backend
depends_on:
- dev-db
environment:
API_PORT: 3000
DATABASE_URL: "postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@dev-db:5432/${DATABASE_NAME}?schema=public"
FAKE_USER_1_CODE: $FAKE_USER_1_CODE
FAKE_USER_1_ID: $FAKE_USER_1_ID
FAKE_USER_1_AVATAR: $FAKE_USER_1_AVATAR
FAKE_USER_2_CODE: $FAKE_USER_2_CODE
FAKE_USER_2_ID: $FAKE_USER_2_ID
FAKE_USER_2_AVATAR: $FAKE_USER_2_AVATAR
FAKE_USER_3_CODE: $FAKE_USER_3_CODE
FAKE_USER_3_ID: $FAKE_USER_3_ID
FAKE_USER_3_AVATAR: $FAKE_USER_3_AVATAR
INTRA_AUTH_GRANT_TYPE: $INTRA_AUTH_GRANT_TYPE
INTRA_AUTH_REDIRECT_URI: $INTRA_AUTH_REDIRECT_URI
INTRA_CLIENT_ID: $INTRA_CLIENT_ID
INTRA_CLIENT_SECRET: $INTRA_CLIENT_SECRET
INTRA_STATE: $INTRA_STATE
JWT_SECRET: $JWT_SECRET
JWT_EXPIRATION_MINUTES: $JWT_EXPIRATION_MINUTES
CIPHER_SECRET: $CIPHER_SECRET
TWO_FACTOR_AUTHENTICATION_APP_NAME: $TWO_FACTOR_AUTHENTICATION_APP_NAME
BASE_URL: $BASE_URL
REACT_APP_API_PORT: 3000 # FE env variables need to be duplicated for server FE from server
REACT_APP_CLIENT_PORT: 4200
REACT_APP_USER_TEST_1_CODE: $FAKE_USER_1_CODE
REACT_APP_USER_TEST_1_AVATAR: $FAKE_USER_1_AVATAR
REACT_APP_USER_TEST_2_CODE: $FAKE_USER_2_CODE
REACT_APP_USER_TEST_2_AVATAR: $FAKE_USER_2_AVATAR
REACT_APP_USER_TEST_3_CODE: $FAKE_USER_3_CODE
REACT_APP_USER_TEST_3_AVATAR: $FAKE_USER_3_AVATAR
REACT_APP_INTRA_CLIENT_ID: $INTRA_CLIENT_ID
REACT_APP_INTRA_STATE: $INTRA_STATE
REACT_APP_INTRA_AUTH_REDIRECT_URI: $INTRA_AUTH_REDIRECT_URI
REACT_APP_JWT_EXPIRATION_MINUTES: $JWT_EXPIRATION_MINUTES
volumes:
- ./server:/server
- ./front/build:/build
ports:
- 3000:3000
networks:
- backend_network
backend-e2e:
build:
context: ./
dockerfile: ./docker/backend-e2e/dockerfile
container_name: backend-e2e
depends_on:
- test-db
restart: always
environment:
DATABASE_URL: "postgresql://${DATABASE_USER_TEST}:${DATABASE_PASSWORD_TEST}@test-db:5436/${DATABASE_NAME_TEST}?schema=public"
INTRA_STATE: $INTRA_STATE
FAKE_USER_1_CODE: $FAKE_USER_1_CODE
JWT_SECRET: $JWT_SECRET
volumes:
- ./server:/server
networks:
- backend_test_network
frontend:
build:
context: ./
dockerfile: ./docker/frontend/dockerfile
container_name: frontend
volumes:
- ./front:/front
ports:
- 4200:4200
networks:
- frontend_network
environment:
REACT_APP_API_PORT: 3000
REACT_APP_CLIENT_PORT: 4200
REACT_APP_USER_TEST_1_CODE: $FAKE_USER_1_CODE
REACT_APP_USER_TEST_1_AVATAR: $FAKE_USER_1_AVATAR
REACT_APP_USER_TEST_2_CODE: $FAKE_USER_2_CODE
REACT_APP_USER_TEST_2_AVATAR: $FAKE_USER_2_AVATAR
REACT_APP_USER_TEST_3_CODE: $FAKE_USER_3_CODE
REACT_APP_USER_TEST_3_AVATAR: $FAKE_USER_3_AVATAR
REACT_APP_INTRA_CLIENT_ID: $INTRA_CLIENT_ID
REACT_APP_INTRA_STATE: $INTRA_STATE
REACT_APP_INTRA_AUTH_REDIRECT_URI: $INTRA_AUTH_REDIRECT_URI
REACT_APP_JWT_EXPIRATION_MINUTES: $JWT_EXPIRATION_MINUTES
dev-db:
image: postgres:16
container_name: dev-db
ports:
- 5432:5432
environment:
POSTGRES_USER: $DATABASE_USER
POSTGRES_PASSWORD: $DATABASE_PASSWORD
POSTGRES_DB: $DATABASE_NAME
networks:
- backend_network
test-db:
image: postgres:16
container_name: test-db
ports:
- 5436:5436
environment:
POSTGRES_USER: $DATABASE_USER_TEST
POSTGRES_PASSWORD: $DATABASE_PASSWORD_TEST
POSTGRES_DB: $DATABASE_NAME_TEST
PGPORT: 5436
networks:
- backend_test_network
# prisma-studio:
# build:
# context: ./
# dockerfile: ./docker/prisma-studio/dockerfile
# container_name: prisma-studio
# depends_on:
# - backend
# environment:
# DATABASE_URL: "postgresql://${DATABASE_USER}:${DATABASE_PASSWORD}@dev-db:${DATABASE_PORT}/${DATABASE_NAME}?schema=public"
# volumes:
# - ./server:/server
# ports:
# - 5555:5555
# networks:
# - backend_network
# restart: always
networks:
frontend_network:
backend_network:
backend_test_network: