generated from ExamProCo/aws-bootcamp-cruddur-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (93 loc) · 3.6 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
90
91
92
93
94
95
96
97
version: "3.8"
services:
backend-flask:
environment:
# GITPOD
# FRONTEND_URL: "https://3000-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}"
# BACKEND_URL: "https://4567-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}"
# CODESPACES
FRONTEND_URL: "https://${CODESPACE_NAME}-3000.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
BACKEND_URL: "https://${CODESPACE_NAME}-4567.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
# LOCAL ENVIRONMENT
# FRONTEND_URL: "http://localhost:3000"
# BACKEND_URL: "http://localhost:4567"
OTEL_SERVICE_NAME: "backend-flask"
OTEL_EXPORTER_OTLP_ENDPOINT: "https://api.honeycomb.io"
OTEL_EXPORTER_OTLP_HEADERS: "x-honeycomb-team=${HONEYCOMB_API_KEY}"
# AWS_XRAY_URL: "*4567-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}*"
# CODESPACES
AWS_XRAY_URL: "https://${CODESPACE_NAME}-4567.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
# AWS_XRAY_URL: "http://localhost:4567"
AWS_XRAY_DAEMON_ADDRESS: "xray-daemon:2000"
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
ROLLBAR_ACCESS_TOKEN: "${ROLLBAR_ACCESS_TOKEN}"
AWS_COGNITO_USER_POOL_ID: "${AWS_COGNITO_USER_POOL_ID}"
AWS_COGNITO_USER_POOL_CLIENT_ID: ${AWS_COGNITO_USER_POOL_CLIENT_ID}
POSTGRESQL_CONNECTION_URL: ${POSTGRESQL_CONNECTION_URL}
POSTGRESQL_PROD_CONNECTION_URL: ${POSTGRESQL_PROD_CONNECTION_URL}
# AWS_ENDPOINT_URL: ${AWS_ENDPOINT_URL}
build: ./backend-flask
ports:
- "4567:4567"
volumes:
- ./backend-flask:/backend-flask
frontend-react-js:
environment:
# GITPOD
# REACT_APP_BACKEND_URL: "https://4567-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}"
#CODESPACES
REACT_APP_BACKEND_URL: "https://${CODESPACE_NAME}-4567.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}"
# LOCAL ENV
# REACT_APP_BACKEND_URL: "http://localhost:4567"
REACT_APP_AWS_PROJECT_REGION: "${AWS_DEFAULT_REGION}"
REACT_APP_AWS_COGNITO_REGION: "${AWS_DEFAULT_REGION}"
REACT_APP_AWS_USER_POOLS_ID: "${AWS_COGNITO_USER_POOL_ID}"
REACT_APP_AWS_USER_POOLS_CLIENT_ID: ${AWS_COGNITO_USER_POOL_CLIENT_ID}
build: ./frontend-react-js
ports:
- "3000:3000"
volumes:
- ./frontend-react-js:/frontend-react-js
# xray-daemon:
# image: "amazon/aws-xray-daemon"
# environment:
# AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
# AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
# AWS_REGION: "us-east-1"
# command:
# - "xray -o -b xray-daemon:2000"
# ports:
# - 2000:2000/udp
# db:
# image: postgres:13-alpine
# restart: always
# environment:
# - POSTGRES_USER=postgres
# - POSTGRES_PASSWORD=password
# ports:
# - '5432:5432'
# volumes:
# - db:/var/lib/postgresql/data
dynamodb-local:
# https://stackoverflow.com/questions/67533058/persist-local-dynamodb-data-in-volumes-lack-permission-unable-to-open-databa
# We needed to add user:root to get this working.
user: root
command: "-jar DynamoDBLocal.jar -sharedDb -dbPath ./data"
image: "amazon/dynamodb-local:latest"
container_name: dynamodb-local
ports:
- "8000:8000"
volumes:
- "./docker/dynamodb:/home/dynamodblocal/data"
working_dir: /home/dynamodblocal
# the name flag is a hack to change the default prepend folder
# name when outputting the image names
networks:
internal-network:
driver: bridge
name: cruddur
volumes:
db:
driver: local