Server side code of Ting.
- Amazon S3
- Create a bucket
- Edit
Cross-origin resource sharing (CORS)
setting under thePermissions
tab to add an allowed origin (the host of ting-app):[ { "AllowedHeaders": [ "*" ], "AllowedMethods": [ "PUT", "GET" ], "AllowedOrigins": [ "http://example.com" ], "ExposeHeaders": [] } ]
- Amazon Simple Email Service
- Add a verified identity
- AWS IAM User
- Create an IAM user that has the permission of
AmazonSESFullAccess
andAmazonS3FullAccess
, then exportAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
as environment variables
- Create an IAM user that has the permission of
- Create a MySQL database called
ting
, then import table structures with schema.sql and initialize initial data with initial_data.sql
sudo docker run -e MYSQL_HOST=your_mysql_host \
-e MYSQL_USER=your_mysql_user \
-e MYSQL_PASSWORD=your_mysql_user_password \
-e REDIS_HOST=your_redis_host \
-e REDIS_PORT=6379 \
-e TING_CONFIRM_REGISTRATION_RETURN_URL=https://ting.dekiru.app/#/confirmRegistration \
-e TING_ALLOWED_ORIGIN=https://ting.dekiru.app \
-e AWS_SES_REGION=your_ses_region \
-e [email protected] \
-e AWS_S3_REGION=your_s3_region \
-e AWS_S3_BUCKET_NAME=ting-static \
-e AWS_ACCESS_KEY_ID=your_aws_access_key \
-e AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key \
-p 8080:8080 \
-d xiaodanmao/ting-server:latest