-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (57 loc) · 1.88 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
version: '2'
services:
postgres:
image: postgres:11.6
volumes:
- ./api/volumes_postgres/volumes_postgres:/var/lib/postgresql/data
api:
container_name: '${API_NAME}'
network_mode: '${API_NETWORK}'
restart: always
env_file: infrastructure/api-configuration/dev-secrets
image: api
build:
context: ./api
dockerfile: Dockerfile.local
args:
PORT: '${API_PORT}'
environment:
DEV_HOST: 'http://localhost:${API_PORT}'
command: >
bash -c 'python wait_for_postgres.py &&
./manage.py migrate &&
./manage.py runserver 0.0.0.0:${API_PORT}'
volumes:
- ./api:/home/user/code
- '${HOME}/.aws:/home/user/.aws'
depends_on:
- client
- postgres
client:
image: node:18.17.1
ports:
- '${API_PORT}:${API_PORT}'
- '${STORYBOOK_PORT}:${STORYBOOK_PORT}'
- '${CLIENT_PORT}:${CLIENT_PORT}'
environment:
STAGE_API_VERSION: '${STAGE_API_VERSION}'
STAGE_API_HOST: 'http://localhost:${API_PORT}'
STAGE_SENTRY_DSN: '${STAGE_SENTRY_DSN}'
STAGE_SENTRY_ENV: '${STAGE_SENTRY_ENV}'
STORYBOOK_PORT: '${STORYBOOK_PORT}'
STAGE_HUBSPOT_PORTAL_ID: '${STAGE_HUBSPOT_PORTAL_ID}'
STAGE_HUBSPOT_EMAIL_LIST_ID: '${STAGE_HUBSPOT_EMAIL_LIST_ID}'
STAGE_HUBSPOT_SURVEY_LIST_ID: '${STAGE_HUBSPOT_SURVEY_LIST_ID}'
STAGE_BANNER_STATE: '${STAGE_BANNER_STATE}'
STAGE_BANNER_CONTENT: '${STAGE_BANNER_CONTENT}'
STAGE_CONTRIBUTIONS_OPEN: '${STAGE_CONTRIBUTIONS_OPEN}'
command: >
bash -c 'cd /home/user/code &&
yarn set version 3.6.3 &&
yarn &&
(yarn storybook --quiet -p ${STORYBOOK_PORT} &
yarn dev -p ${CLIENT_PORT})'
volumes:
- ./client:/home/user/code
- ./client/node_modules:/home/user/code/node_modules
- ./client/.next:/home/user/code/.next