Skip to content

Commit

Permalink
feat: added platform definitions to docker compose files to ensure m1…
Browse files Browse the repository at this point in the history
…&m2 chips use amd images
  • Loading branch information
arpargo authored and karisal-anders committed Nov 6, 2023
1 parent 0f27519 commit b414db7
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 60 deletions.
5 changes: 5 additions & 0 deletions compose.benefit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
context: ./backend
dockerfile: ./docker/finnish_postgres.Dockerfile
platform: linux/amd64
restart: on-failure
environment:
POSTGRES_USER: benefit
Expand All @@ -23,6 +24,7 @@ services:
context: ./backend
dockerfile: ./docker/benefit.Dockerfile
target: development
platform: linux/amd64
env_file:
- .env.benefit-backend
environment:
Expand All @@ -43,6 +45,7 @@ services:
PORT: 3000
PROJECT: benefit
FOLDER: applicant
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
Expand All @@ -59,6 +62,7 @@ services:
PORT: 3100
PROJECT: benefit
FOLDER: handler
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
Expand All @@ -75,6 +79,7 @@ services:
- handler
build:
context: ./localdevelopment/benefit/nginx
platform: linux/amd64
container_name: benefit-local-proxy
volumes:
- ./localdevelopment/benefit/nginx/:/etc/nginx/
Expand Down
4 changes: 4 additions & 0 deletions compose.employer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
context: ./backend
dockerfile: ./docker/finnish_postgres.Dockerfile
platform: linux/amd64
restart: on-failure
environment:
POSTGRES_USER: kesaseteli
Expand All @@ -23,6 +24,7 @@ services:
context: ./backend
dockerfile: ./docker/kesaseteli.Dockerfile
target: development
platform: linux/amd64
env_file:
- .env.kesaseteli
environment:
Expand All @@ -44,6 +46,7 @@ services:
PORT: 3100
PROJECT: kesaseteli
FOLDER: employer
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
Expand All @@ -61,6 +64,7 @@ services:
- employer
build:
context: ./localdevelopment/employer/nginx
platform: linux/amd64
container_name: kesaseteli-employer-local-proxy
volumes:
- ./localdevelopment/employer/nginx/:/etc/nginx/
Expand Down
5 changes: 5 additions & 0 deletions compose.handler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
context: ./backend
dockerfile: ./docker/finnish_postgres.Dockerfile
platform: linux/amd64
restart: on-failure
environment:
POSTGRES_USER: kesaseteli
Expand All @@ -23,6 +24,7 @@ services:
context: ./backend
dockerfile: ./docker/kesaseteli.Dockerfile
target: development
platform: linux/amd64
env_file:
- .env.kesaseteli
environment:
Expand All @@ -44,6 +46,7 @@ services:
PORT: 3100
PROJECT: kesaseteli
FOLDER: youth
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
Expand All @@ -60,6 +63,7 @@ services:
PORT: 3200
PROJECT: kesaseteli
FOLDER: handler
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
Expand All @@ -76,6 +80,7 @@ services:
- youth
build:
context: ./localdevelopment/handler/nginx
platform: linux/amd64
container_name: kesaseteli-handler-local-proxy
volumes:
- ./localdevelopment/handler/nginx/:/etc/nginx/
Expand Down
36 changes: 20 additions & 16 deletions compose.tet-admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
dockerfile: ./docker/finnish_postgres.Dockerfile
context: ./backend
platform: linux/amd64
restart: on-failure
environment:
POSTGRES_USER: tet
Expand All @@ -21,6 +22,7 @@ services:
context: ./backend
dockerfile: ./docker/tet.Dockerfile
target: development
platform: linux/amd64
env_file:
- .env.tet
environment:
Expand All @@ -35,22 +37,23 @@ services:
container_name: te-backend

admin:
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: admin
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
environment:
NEXT_PUBLIC_MOCK_FLAG: 1
container_name: te-admin
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: admin
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
environment:
NEXT_PUBLIC_MOCK_FLAG: 1
container_name: te-admin

local-proxy:
depends_on:
Expand All @@ -59,6 +62,7 @@ services:
- admin
build:
context: ./localdevelopment/tet-admin/nginx
platform: linux/amd64
container_name: te-local-proxy
volumes:
- ./localdevelopment/tet-admin/nginx/:/etc/nginx/
Expand Down
36 changes: 20 additions & 16 deletions compose.tet-youth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
dockerfile: ./docker/finnish_postgres.Dockerfile
context: ./backend
platform: linux/amd64
restart: on-failure
environment:
POSTGRES_USER: tet
Expand All @@ -21,6 +22,7 @@ services:
context: ./backend
dockerfile: ./docker/tet.Dockerfile
target: development
platform: linux/amd64
env_file:
- .env.tet
environment:
Expand All @@ -35,22 +37,23 @@ services:
container_name: te-backend

youth:
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: youth
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
environment:
NEXT_PUBLIC_MOCK_FLAG: 1
container_name: te-youth
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: youth
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
environment:
NEXT_PUBLIC_MOCK_FLAG: 1
container_name: te-youth

local-proxy:
depends_on:
Expand All @@ -59,6 +62,7 @@ services:
- youth
build:
context: ./localdevelopment/tet-youth/nginx
platform: linux/amd64
container_name: te-local-proxy
volumes:
- ./localdevelopment/tet-youth/nginx/:/etc/nginx/
Expand Down
61 changes: 33 additions & 28 deletions compose.tet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
build:
dockerfile: ./docker/finnish_postgres.Dockerfile
context: ./backend
platform: linux/amd64
restart: on-failure
environment:
POSTGRES_USER: tet
Expand All @@ -23,6 +24,7 @@ services:
context: ./backend
dockerfile: ./docker/tet.Dockerfile
target: development
platform: linux/amd64
env_file:
- .env.tet
environment:
Expand All @@ -37,36 +39,38 @@ services:
container_name: te-backend

youth:
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: youth
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
container_name: te-youth
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: youth
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
container_name: te-youth

admin:
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: admin
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
container_name: te-admin
build:
context: ./frontend
target: development
args:
PORT: 3000
PROJECT: tet
FOLDER: admin
platform: linux/amd64
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
env_file:
- .env.tet
container_name: te-admin

local-proxy:
depends_on:
Expand All @@ -76,6 +80,7 @@ services:
- youth
build:
context: ./localdevelopment/tet/nginx
platform: linux/amd64
container_name: te-local-proxy
volumes:
- ./localdevelopment/tet/nginx/:/etc/nginx/
Expand Down

0 comments on commit b414db7

Please sign in to comment.