-
Notifications
You must be signed in to change notification settings - Fork 70
/
compose.yaml
186 lines (177 loc) · 6.61 KB
/
compose.yaml
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
version: '3.8'
volumes:
designer-git-data:
gitea-git-data:
gitea-avatars-data:
gitea-attachments-data:
keys:
pgdata:
services:
studio_azure_mock:
image: studio-azure-mock:${COMMIT:-latest}
container_name: studio-azure-mock
build:
context: ./development/azure-devops-mock
ports:
- '6161:6161'
environment:
- DESIGNER_HOST=studio-loadbalancer
studio_loadbalancer:
image: nginx:alpine
container_name: studio-loadbalancer
restart: always
ports:
- '80:80'
environment:
- DEVELOP_APP_DEVELOPMENT=${DEVELOP_APP_DEVELOPMENT:-0}
- DEVELOP_RESOURCE_ADMIN=${DEVELOP_RESOURCE_ADMIN:-0}
- DEVELOP_BACKEND=${DEVELOP_BACKEND:-0}
- DEVELOP_DASHBOARD=${DEVELOP_DASHBOARD:-0}
- DEVELOP_PREVIEW=${DEVELOP_PREVIEW:-0}
- DEVELOP_STUDIO_ROOT=${DEVELOP_STUDIO_ROOT:-0}
- NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/
- NGINX_ENVSUBST_TEMPLATE_SUFFIX=.conf
- NGINX_HOST=localhost
- NGINX_PORT=80
depends_on:
studio_repositories:
condition: service_healthy
studio_designer:
condition: service_healthy
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- ./development/load-balancer/templates:/etc/nginx/templates:ro
- ./development/load-balancer/www:/www:ro
studio_designer:
container_name: studio-designer
image: designer:${COMMIT:-latest}
restart: always
volumes:
- 'designer-git-data:/AltinnCore/Repos'
- 'keys:/mnt/keys'
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:6000
- GeneralSettings:AltinnStudioEndpoint=http://studio.localhost/
- GeneralSettings:AppLocation=Templates/AspNet/App
- GeneralSettings:DeploymentLocation=/Templates/deployment
- GeneralSettings:DeploymentLocation=Templates/AspNet/deployment
- GeneralSettings:EnvironmentsUrl=http://studio-azure-mock:6161/environments.json
- GeneralSettings:IntegrationTestsLocation=Templates/AspNet/App.IntegrationTests
- GeneralSettings:LanguageFilesLocation=Languages/
- GeneralSettings:TemplateLocation=/Templates
- GeneralSettings:TemplateLocation=Templates/AspNet
- PostgreSQLSettings:AdminConnectionString=Host=studio_db;Port=5432;Username=designer_admin;Password={0};Database=designerdb
- PostgreSQLSettings:ConnectionString=Host=studio_db;Port=5432;Username=designer;Password={0};Database=designerdb
- PostgreSQLSettings:DesignerDbAdminPwd=${POSTGRES_PASSWORD}
- PostgreSQLSettings:DesignerDbPwd=designer
- PostgreSQLSettings:EnableDBConnection=true
- ServiceRepositorySettings:ApiEndPoint=http://studio-repositories:3000/api/v1/
- ServiceRepositorySettings:ApiEndPointHost=studio-repositories
- ServiceRepositorySettings:GiteaLoginUrl=http://studio.localhost/repos/user/login
- ServiceRepositorySettings:RepositoryBaseURL=http://studio-repositories:3000
- ServiceRepositorySettings:RepositoryLocation=/AltinnCore/Repos/
- TestdataRepositorySettings:RepositoryLocation=/Testdata
- Integrations:AzureDevOpsSettings:BaseUri=http://studio-azure-mock:6161/_apis/
- OidcLoginSettings:ClientId=${CLIENT_ID}
- OidcLoginSettings:ClientSecret=${CLIENT_SECRET}
- OidcLoginSettings:Authority=http://studio.localhost/repos/
- OidcLoginSettings:RequireHttpsMetadata=false
- OidcLoginSettings:CookieExpiryTimeInMinutes=59
- OidcLoginSettings:FetchClientIdAndSecretFromRootEnvFile=false
- FeatureManagement:Ansattporten=${FEATUREFLAGS_ANSATTPORTEN:-false}
- AnsattPortenLoginSettings:ClientId=${ANSATTPORTEN_CLIENTID:-}
- AnsattPortenLoginSettings:ClientSecret=${ANSATTPORTEN_CLIENTSECRET:-}
ports:
- '6000:6000'
depends_on:
studio_db:
condition: service_healthy
build:
context: .
extra_hosts:
- 'host.docker.internal:host-gateway'
- 'studio.localhost:host-gateway'
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:6000/health" ]
interval: 5s
timeout: 10s
retries: 5
studio_repositories:
container_name: studio-repositories
image: repositories:latest
restart: always
volumes:
- 'gitea-git-data:/var/lib/gitea/git'
- 'gitea-avatars-data:/var/lib/gitea/avatars'
- 'gitea-attachments-data:/var/lib/gitea/attachments'
environment:
- GITEA____RUN_MODE=prod
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=studio_db:5432
- GITEA__database__NAME=giteadb
- GITEA__database__PASSWD=gitea
- GITEA__database__USER=gitea
- GITEA__designer__LFS_JWT_SECRET=MRlYoCcrcHmcKzUoQwaK6vKO3o4FPEJ74em5JnPRii0
- GITEA__mailer__ENABLED=false
- GITEA__mailer__ENABLE_NOTIFY_MAIL=false
- GITEA__mailer__HOST=none
- GITEA__mailer__REGISTER_EMAIL_CONFIRM=false
- GITEA__mailer__SKIP_VERIFY=false
- GITEA__security__INTERNAL_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1MjMyNjM2NTR9.nxb5jknOl-LnVxOvyu0McHglWoixrfOD0mLZ8Druerw
- GITEA__security__SECRET_KEY=VCOEYZOz3vPZrm1vGBOL6paxSePtLUHc85LsK7QIqbPHRcohw72p5K8EQQJ7YrgA
- GITEA__server__DOMAIN=studio.localhost
- GITEA__server__ROOT_URL=http://studio.localhost/repos
- GITEA__server__SSH_DOMAIN=studio.localhost
- GITEA__service__ENABLE_CAPTCHA=false
- GITEA__session__COOKIE_SECURE=false
- USER_GID=1000
- USER_UID=1000
ports:
- '3000:3000'
- '222:22'
build:
context: ./gitea/
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
studio_db:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "--fail", "http://localhost:3000/api/healthz" ]
interval: 5s
timeout: 10s
retries: 5
studio_db:
container_name: studio-db
image: postgres:alpine
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: designer_admin
POSTGRES_DB: designerdb
ports:
- '5432:5432'
volumes:
- ./development/db/init.sql:/docker-entrypoint-initdb.d/init.sql
- pgdata:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U designer_admin -d designerdb" ]
interval: 10s
timeout: 5s
retries: 5
database_migrations:
container_name: db-database_migrations
depends_on:
studio_db:
condition: service_healthy
build:
context: backend
dockerfile: Migrations.Dockerfile
environment:
- PGHOST=studio_db
- PGPORT=5432
- PGUSER=designer_admin
- PGPASSWORD=${POSTGRES_PASSWORD}
- PGDATABASE=designerdb