-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.ci.yml
93 lines (90 loc) · 2.31 KB
/
docker-compose.ci.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
90
91
92
93
version: "3.7"
services:
db:
image: postgres:15-alpine
container_name: ${PROJECT}-db-${ENV}
restart: always
env_file: .env
environment:
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_ROOT_PASSWORD: ${DB_PASSWORD}
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
networks:
- tc
frontend:
container_name: ${PROJECT}-frontend-${ENV}
entrypoint: sh -c "npm run dev"
env_file: .env
build:
context: "./frontend"
dockerfile: Dockerfile.ci
environment:
NODE_ENV: ci
ENV: ci
PORT: 3000
BACKEND_URL: http://backend:3000
CYPRESS_BASE_URL: ${CYPRESS_BASE_URL}
CYPRESS_AUTH_ORIGIN: ${CYPRESS_AUTH_ORIGIN}
KEYCLOAK_USER: ${KEYCLOAK_USER}
KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD}
ports:
- "3000:3000"
volumes: ["./frontend:/app", "/app/node_modules"]
working_dir: "/app"
networks:
- tc
depends_on:
- backend
backend:
container_name: ${PROJECT}-backend-ci
image: ${PROJECT}-backend:${GIT_LOCAL_BRANCH}
build:
context: "./backend"
dockerfile: Dockerfile.ci
restart: always
stdin_open: true
command: "npm run start:dev"
env_file: .env
environment:
NODE_ENV: ${ENV}
ENV: ${ENV}
PORT: 3000
DB_PORT: ${DB_PORT}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
KEYCLOAK_REALM: ${KEYCLOAK_REALM}
KEYCLOAK_AUTH_URL: ${KEYCLOAK_AUTH_URL}
KEYCLOAK_CLIENT: ${KEYCLOAK_CLIENT}
DB_PASSWORD: ${DB_PASSWORD}
MODE: ${MODE}
CHOKIDAR_USEPOLLING: "true"
ALLOW_EMPTY_PASSWORD: "yes"
END_DATE: ${END_DATE}
TEST_EMAIL: ${TEST_EMAIL}
END_RECOMMITMENT_SCHEDULE: ${END_RECOMMITMENT_SCHEDULE}
START_RECOMMITMENT_SCHEDULE: ${START_RECOMMITMENT_SCHEDULE}
NOTIFICATION_SCHEDULE: ${NOTIFICATION_SCHEDULE}
RECOMMITMENT_MINISTRY: ${RECOMMITMENT_MINISTRY}
ports:
- "3001:3000"
volumes:
- /usr/src/app/node_modules
- ./backend:/usr/src/app
depends_on:
- db
networks:
- tc
volumes:
pg_data: {}
keycloak: {}
networks:
tc:
driver: bridge