-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·132 lines (117 loc) · 3.19 KB
/
docker-compose.yml
File metadata and controls
executable file
·132 lines (117 loc) · 3.19 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# NOTE - Docker Compose is STRICTLY Meant for develop purpose.
x-common-variables: &common-variables
# Only set these in compose file. Leave config.py as it is.
DEBUG: True
ENV: development
SQL_DATABASE_USER: admin
SQL_DATABASE_PASS: REPLACEME
SQL_DATABASE_SERVER: mariadb-service
SQL_DATABASE_NAME: app
CELERY_BACKED_BY: REDIS
# Either use these two to supply User Access Key ID / Secret
AWS_ACCESS_KEY_ID: REPLACEME
AWS_SECRET_ACCESS_KEY: REPLACEME
# For google signin testing
OAUTHLIB_INSECURE_TRANSPORT: '1'
GOOGLE_CLIENT_ID: REPLACEME
GOOGLE_CLIENT_SECRET: REPLACEME
# Or uncomment and use these two to simulate using STS Task IAM Role
#CELERY_SQS_PREDEFINED_QUEUE: REPLACEME
#AWS_CONTAINER_CREDENTIALS_RELATIVE_URI: /creds
services:
web:
profiles: ["dev", "deploy"]
depends_on:
- "tasks"
image: architect:dev_test
restart: on-failure
build:
context: ./
dockerfile: Dockerfile
volumes:
- "./application:/var/application"
# - "/c/projects/operator/operator_client:/usr/local/lib/python3.11/site-packages/operator_client"
ports:
- "3000:3000"
- "4242:4242"
environment:
<<: *common-variables
networks:
credentials_network:
ipv4_address: "169.254.170.3"
tasks:
profiles: ["dev", "deploy"]
image: architect:dev_test
restart: on-failure
build:
context: ./
dockerfile: Dockerfile
volumes:
- "./application:/var/application"
command: "celery -A application.wsgi_worker:WORKER worker -l DEBUG --beat -l DEBUG -c 2"
environment:
<<: *common-variables
networks:
credentials_network:
ipv4_address: "169.254.170.4"
# Note - One must have aws cli installed and credentials set to user that has a trust relationship
# with the Task ECS Role associated with it.
ecs-local-endpoints:
profiles: ["dev"]
image: amazon/amazon-ecs-local-container-endpoints
volumes:
- /var/run:/var/run
- $HOME/.aws/:/home/.aws/
ports:
- "8888:80" # Local debugging can use port 8888
environment:
HOME: "/home"
AWS_PROFILE: "default"
networks:
credentials_network:
ipv4_address: "169.254.170.2"
redis-service:
profiles: ["dev"]
image: redis:7.2-alpine
restart: always
ports:
- 6379:6379
networks:
credentials_network:
ipv4_address: "169.254.170.5"
mariadb-service:
profiles: ["dev"]
image: mariadb:10.11.8
restart: always
ports:
- 3306:3306
environment:
MARIADB_DATABASE: app
MARIADB_USER: admin
MARIADB_PASSWORD: REPLACEME
MARIADB_ROOT_PASSWORD: REPLACEME # Change Me!
volumes:
- mysql-data:/var/lib/mysql
networks:
credentials_network:
ipv4_address: "169.254.170.6"
adminer:
profiles: ["dev"]
depends_on:
- "mariadb-service"
image: adminer:4.8.1-standalone
restart: always
ports:
- 8080:8080
networks:
credentials_network:
ipv4_address: "169.254.170.7"
volumes:
mysql-data:
networks:
credentials_network:
driver: bridge
ipam:
config:
- subnet: "169.254.170.0/24"
gateway: "169.254.170.1"