Skip to content

Commit d907a36

Browse files
authored
Merge pull request #26 from Flagsmith/release/v2.1.2
Release v2.1.2
2 parents d399a05 + e8dc7f4 commit d907a36

File tree

4 files changed

+82
-9
lines changed

4 files changed

+82
-9
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy SSE to Production ECS
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
paths:
8+
- "src/**"
9+
- ".github/**"
10+
- "infrastructure/aws/production/**"
11+
jobs:
12+
deploy-production-ecs:
13+
runs-on: ubuntu-latest
14+
name: Deploy SSE to Production ECS
15+
environment: production
16+
17+
steps:
18+
- name: Cloning repo
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Deploy SSE to Production
24+
uses: ./.github/actions/sse-deploy-ecs
25+
with:
26+
aws_access_key_id: AKIARHES7IUAY422LL5W
27+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
28+
aws_ecs_cluster_name: flagsmith-api-cluster-eu-west-2-f0b0108
29+
aws_ecs_service_name: flagsmith-sse-svc-eu-west-2-2dd73e1
30+
aws_ecr_repository_arn: 084060095745.dkr.ecr.eu-west-2.amazonaws.com/flagsmith-sse-ecr-27095a4
31+
aws_task_definitions_directory_path: infrastructure/aws/production
32+

.github/workflows/sse-deploy-staging-ecs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ on:
55
branches:
66
- main
77
paths:
8-
- "api/**"
8+
- "src/**"
99
- ".github/**"
10-
- 'infrastructure/aws/staging/**'
10+
- "infrastructure/aws/staging/**"
1111

1212
jobs:
1313
deploy-staging-ecs:
@@ -24,8 +24,8 @@ jobs:
2424
- name: Deploy SSE to Staging
2525
uses: ./.github/actions/sse-deploy-ecs
2626
with:
27-
aws_access_key_id: AKIAUM26IRCPH7BHBLVE
28-
aws_secret_access_key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
27+
aws_access_key_id: AKIAUM26IRCPKP5BWQSJ
28+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2929
aws_ecs_cluster_name: flagsmith-api-cluster-eu-west-2-f241261
3030
aws_ecs_service_name: flagsmith-sse-svc-eu-west-2-43f7af2
3131
aws_ecr_repository_arn: 302456015006.dkr.ecr.eu-west-2.amazonaws.com/flagsmith-sse-ecr-fa16ac8
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"family": "flagsmith-sse",
3+
"networkMode": "awsvpc",
4+
"executionRoleArn": "arn:aws:iam::084060095745:role/task-sse-role-bb6bdb2",
5+
"taskRoleArn": "arn:aws:iam::084060095745:role/task-sse-role-bb6bdb2",
6+
"containerDefinitions": [
7+
{
8+
"name": "flagsmith-sse",
9+
"command": [
10+
"uvicorn",
11+
"src.main:app",
12+
"--host",
13+
"0.0.0.0",
14+
"--port",
15+
"8000",
16+
"--no-access-log"
17+
],
18+
"cpu": 0,
19+
"portMappings": [
20+
{
21+
"containerPort": 8000,
22+
"hostPort": 8000,
23+
"protocol": "tcp"
24+
}
25+
],
26+
"essential": true,
27+
"environment": [],
28+
"secrets": [],
29+
"logConfiguration": {
30+
"logDriver": "awslogs",
31+
"options": {
32+
"awslogs-group": "flagsmith-sse-eu-west-2-0c3eaaf",
33+
"awslogs-region": "eu-west-2",
34+
"awslogs-stream-prefix": "awslogs-flagsmith-sse"
35+
}
36+
}
37+
}
38+
],
39+
"requiresCompatibilities": [
40+
"FARGATE"
41+
],
42+
"cpu": "1024",
43+
"memory": "2048"
44+
}

src/settings.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ def json_config_settings_source(settings: BaseSettings) -> Dict[str, Any]:
1616
A simple settings source that loads variables from a JSON file
1717
at the project's root.
1818
"""
19-
encoding = settings.__config__.env_file_encoding
20-
env_file = settings.__config__.env_file
19+
encoding = "utf-8"
20+
env_file = "config.json"
2121
return json.loads(Path(env_file).read_text(encoding))
2222

2323

@@ -38,9 +38,6 @@ class Settings(BaseSettings):
3838
allow_origins: List[str] = ["*"]
3939

4040
class Config:
41-
env_file = "config.json"
42-
env_file_encoding = "utf-8"
43-
4441
@classmethod
4542
def customise_sources(
4643
cls,

0 commit comments

Comments
 (0)