Skip to content

Commit f53d8f7

Browse files
feat: add name and limits to docker containers
adds a container name and limits to containers so that they do not hog all the resources when running on gitpod
1 parent 1c00f20 commit f53d8f7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docker-compose.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: '3'
22
services:
33
supertokens_mysql_db:
44
image: mysql/mysql-server:latest
5+
container_name: mysql_supertokens
56
restart: always
67
ports:
78
- "3306:3306"
@@ -10,12 +11,23 @@ services:
1011
MYSQL_ROOT_PASSWORD: root
1112
MYSQL_DATABASE: supertokens
1213
MYSQL_ROOT_HOST: '%'
14+
deploy:
15+
resources:
16+
limits:
17+
cpus: "0.25"
18+
memory: 500M
1319
supertokens_postgres_db:
1420
image: postgres:12
21+
container_name: postgres_supertokens
1522
restart: always
1623
ports:
1724
- '5432:5432'
1825
environment:
1926
POSTGRES_PASSWORD: root
2027
POSTGRES_USER: root
2128
POSTGRES_DB: supertokens
29+
deploy:
30+
resources:
31+
limits:
32+
cpus: "0.25"
33+
memory: 500M

0 commit comments

Comments
 (0)