Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 3309a0e

Browse files
feat: use ansible-free docker image for ecommerce (#1057)
1 parent a7b7241 commit 3309a0e

3 files changed

Lines changed: 136 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ dev.shell.discovery:
432432
docker-compose exec discovery env TERM=$(TERM) bash -c '/bin/bash'
433433

434434
dev.shell.ecommerce:
435-
docker-compose exec ecommerce env TERM=$(TERM) /edx/app/ecommerce/devstack.sh open
435+
docker-compose exec ecommerce env TERM=$(TERM) /bin/bash
436436

437437
dev.shell.registrar:
438438
docker-compose exec registrar env TERM=$(TERM) /bin/bash

configuration_files/ecommerce.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
3+
AFFILIATE_COOKIE_KEY: dev_affiliate_id
4+
API_ROOT: null
5+
BACKEND_SERVICE_EDX_OAUTH2_KEY: ecommerce-backend-service-key
6+
BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://localhost:18000/oauth2
7+
BACKEND_SERVICE_EDX_OAUTH2_SECRET: ecommerce-backend-service-secret
8+
ECOMMERCE_WORKER_BROKER_HOST: 172.17.0.2
9+
BROKER_URL: amqp://celery:celery@172.17.0.2:5672
10+
CACHES:
11+
default:
12+
BACKEND: django.core.cache.backends.memcached.MemcachedCache
13+
KEY_PREFIX: ecommerce
14+
LOCATION:
15+
- edx.devstack.memcached:11211
16+
COMPREHENSIVE_THEME_DIRS:
17+
- /edx/var/edx-themes/edx-themes/ecommerce
18+
- /edx/app/ecommerce/ecommerce/ecommerce/themes
19+
CORS_ALLOW_CREDENTIALS: false
20+
CORS_ORIGIN_WHITELIST: []
21+
CORS_URLS_REGEX: ''
22+
CSRF_COOKIE_SECURE: false
23+
DATABASES:
24+
default:
25+
ATOMIC_REQUESTS: true
26+
CONN_MAX_AGE: 60
27+
ENGINE: django.db.backends.mysql
28+
HOST: edx.devstack.mysql57
29+
NAME: ecommerce
30+
OPTIONS:
31+
connect_timeout: 10
32+
init_command: SET sql_mode='STRICT_TRANS_TABLES'
33+
PASSWORD: password
34+
PORT: '3306'
35+
USER: ecomm001
36+
DEFAULT_SITE_THEME: null
37+
ECOMMERCE_URL_ROOT: http://localhost:18130
38+
EDX_API_KEY: PUT_YOUR_API_KEY_HERE
39+
EDX_DRF_EXTENSIONS:
40+
JWT_PAYLOAD_MERGEABLE_USER_ATTRIBUTES:
41+
- tracking_context
42+
JWT_PAYLOAD_USER_ATTRIBUTE_MAPPING:
43+
administrator: is_staff
44+
email: email
45+
full_name: full_name
46+
tracking_context: tracking_context
47+
user_id: lms_user_id
48+
OAUTH2_USER_INFO_URL: http://edx.devstack.lms:18000/oauth2/user_info
49+
ENABLE_COMPREHENSIVE_THEMING: false
50+
ENROLLMENT_FULFILLMENT_TIMEOUT: 7
51+
ENTERPRISE_SERVICE_URL: http://edx.devstack.lms:18000/enterprise/
52+
ENTERPRISE_LEARNER_PORTAL_HOSTNAME: localhost:8734
53+
EXTRA_APPS: []
54+
JWT_AUTH:
55+
JWT_ALGORITHM: HS256
56+
JWT_AUTH_COOKIE_HEADER_PAYLOAD: edx-jwt-cookie-header-payload
57+
JWT_AUTH_COOKIE_SIGNATURE: edx-jwt-cookie-signature
58+
JWT_DECODE_HANDLER: ecommerce.extensions.api.handlers.jwt_decode_handler
59+
JWT_ISSUERS:
60+
- AUDIENCE: lms-key
61+
ISSUER: http://localhost:18000/oauth2
62+
SECRET_KEY: lms-secret
63+
- AUDIENCE: lms-key
64+
ISSUER: ecommerce_worker
65+
SECRET_KEY: lms-secret
66+
JWT_LEEWAY: 1
67+
JWT_PUBLIC_SIGNING_JWK_SET: ''
68+
JWT_SECRET_KEY: lms-secret
69+
JWT_VERIFY_EXPIRATION: true
70+
LANGUAGE_CODE: en
71+
LANGUAGE_COOKIE_NAME: openedx-language-preference
72+
LOGGING_ROOT_OVERRIDES: {}
73+
LOGGING_SUBSECTION_OVERRIDES: {}
74+
MEDIA_STORAGE_BACKEND:
75+
DEFAULT_FILE_STORAGE: django.core.files.storage.FileSystemStorage
76+
MEDIA_ROOT: /edx/var/ecommerce/media
77+
MEDIA_URL: /media/
78+
OSCAR_FROM_EMAIL: oscar@example.com
79+
PAYMENT_MICROFRONTEND_URL: null
80+
PAYMENT_PROCESSOR_CONFIG:
81+
edx:
82+
cybersource:
83+
access_key: SET-ME-PLEASE
84+
apple_pay_country_code: US
85+
apple_pay_merchant_id_certificate_path: /edx/etc/ssl/apple_pay_merchant.pem
86+
apple_pay_merchant_id_domain_association: 'This value should also be in
87+
private configuration. It, too,
88+
89+
will span multiple lines.
90+
91+
'
92+
apple_pay_merchant_identifier: merchant.com.example
93+
cancel_page_url: /checkout/cancel-checkout/
94+
merchant_id: SET-ME-PLEASE
95+
payment_page_url: https://testsecureacceptance.cybersource.com/pay
96+
profile_id: SET-ME-PLEASE
97+
receipt_page_url: /checkout/receipt/
98+
secret_key: SET-ME-PLEASE
99+
send_level_2_3_details: true
100+
soap_api_url: https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl
101+
sop_access_key: SET-ME-PLEASE
102+
sop_payment_page_url: https://testsecureacceptance.cybersource.com/silent/pay
103+
sop_profile_id: SET-ME-PLEASE
104+
sop_secret_key: SET-ME-PLEASE
105+
transaction_key: SET-ME-PLEASE
106+
paypal:
107+
cancel_url: /checkout/cancel-checkout/
108+
client_id: SET-ME-PLEASE
109+
client_secret: SET-ME-PLEASE
110+
error_url: /checkout/error/
111+
mode: sandbox
112+
receipt_url: /checkout/receipt/
113+
PLATFORM_NAME: Your Platform Name Here
114+
SAILTHRU_KEY: sailthru key here
115+
SAILTHRU_SECRET: sailthru secret here
116+
SECRET_KEY: Your secret key here
117+
SESSION_COOKIE_SECURE: true
118+
SESSION_EXPIRE_AT_BROWSER_CLOSE: false
119+
SOCIAL_AUTH_EDX_OAUTH2_ISSUER: http://127.0.0.1:8000
120+
SOCIAL_AUTH_EDX_OAUTH2_KEY: ecommerce-sso-key
121+
SOCIAL_AUTH_EDX_OAUTH2_LOGOUT_URL: http://localhost:18000/logout
122+
SOCIAL_AUTH_EDX_OAUTH2_SECRET: ecommerce-sso-secret
123+
SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT: http://127.0.0.1:8000
124+
SOCIAL_AUTH_REDIRECT_IS_HTTPS: false
125+
STATICFILES_STORAGE: ecommerce.theming.storage.ThemeStorage
126+
STATIC_ROOT: /edx/var/ecommerce/staticfiles
127+
THEME_SCSS: sass/themes/default.scss
128+
TIME_ZONE: UTC
129+
USERNAME_REPLACEMENT_WORKER: OVERRIDE THIS WITH A VALID USERNAME
130+
SDN_CHECK_API_URL: https://data.trade.gov/consolidated_screening_list/v1/search
131+
SDN_CHECK_API_KEY: sdn search key here

docker-compose.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,16 @@ services:
373373
environment:
374374
DJANGO_WATCHMAN_TIMEOUT: 30
375375
ENABLE_DJANGO_TOOLBAR: 1
376-
image: edxops/ecommerce:${OPENEDX_RELEASE:-latest}
376+
image: edxops/ecommerce-dev:${OPENEDX_RELEASE:-latest}
377377
networks:
378378
default:
379379
aliases:
380380
- edx.devstack.ecommerce
381381
ports:
382382
- "18130:18130"
383+
volumes:
384+
- ${PWD}/configuration_files/ecommerce.yml:/edx/etc/ecommerce.yml
385+
383386

384387
edx_notes_api:
385388
# Sleep as a part of start up to give elasticsearch enough time to start up.

0 commit comments

Comments
 (0)