-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
113 lines (108 loc) · 3.83 KB
/
docker-compose.yml
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
services:
postgres:
image: postgres:12.15
restart: always
environment:
POSTGRES_PASSWORD: password1234
volumes:
- ./infrastructure/db:/docker-entrypoint-initdb.d/
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
adminer:
image: adminer
restart: always
environment:
- ADMINER_DEFAULT_SERVER=postgres
links:
- postgres
ports:
- 8080:8080
webserver:
build:
context: ./
dockerfile: infrastructure/webserver.Dockerfile
restart: always
volumes:
- ./:/home/site/wwwroot
- ./infrastructure/conf/nginx-conf-local:/etc/nginx/sites-available/
- ./infrastructure/conf/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
- ./infrastructure/conf/php-fpm-www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./infrastructure/conf/php-fpm-docker.conf:/usr/local/etc/php-fpm.d/docker.conf:ro
ports:
- 8000:8080
environment:
- ROBOTS_FILENAME=dev.robots.txt
- WEBSITE_SITE_NAME=localhost
extra_hosts:
- "host.docker.internal:host-gateway"
maintenance:
build: ./infrastructure/maintenance-container
working_dir: /root/scripts
deploy:
mode: replicated
replicas: 0
volumes:
- maintenancedata:/root
- ./.git:/var/www/html/.git
- ./.gitignore:/var/www/html/.gitignore
- ./.gitattributes:/var/www/html/.gitattributes
- ./maintenance/scripts:/root/scripts
- ./api:/var/www/html/api
- ./apps:/var/www/html/apps
- ./packages:/var/www/html/packages
- ./tc-report:/var/www/html/tc-report
- ./package.json:/var/www/html/package.json
- ./pnpm-lock.yaml:/var/www/html/pnpm-lock.yaml
- ./pnpm-workspace.yaml:/var/www/html/pnpm-workspace.yaml
- ./.npmrc:/var/www/html/.npmrc
- ./node_modules:/var/www/html/node_modules
- ./turbo.json:/var/www/html/turbo.json
- ./hydrogen.config.json:/var/www/html/hydrogen.config.json
# We proxy the auth server through apache, so it's at localhost.
# E.g., http://localhost:8000/oxauth/.well-known/openid-configuration
#
# We shouldn't need to expose mock-oauth2-server directly (outside the apache
# proxy), but if this is required:
#
# 1. uncomment the container configuration lines below.
# 2. add this entry to your `hosts` file:
#
# auth.talent.canada.test 127.0.0.1
#
# 3. Rebuild docker container:
#
# $ docker compose up --detach --build mock-auth
#
# 4. Confirm working by visiting:
#
# http://auth.talent.canada.test:8081/oxauth/.well-known/openid-configuration
#
mock-auth:
# See: https://github.com/navikt/mock-oauth2-server#standalone-server
image: ghcr.io/navikt/mock-oauth2-server:2.1.5
volumes:
- ./infrastructure/conf:/app/conf
# Container shuts down with exit code 143 instead of the standard "0", so
# we ensure it comes back up after a Docker Desktop console restart.
# See: https://docs.docker.com/config/containers/start-containers-automatically/#use-a-restart-policy
restart: unless-stopped
environment:
# Things to note in config:
# - we mock a response but leave out "sub", so that value entered in fake
# login form will be used.
# - we match specifically for client_id `fake-development-client-key`,
# which must be set in `.env`.
# - we set interactiveLogin:true, for easy selection of any test user
# (for which subject/sub will be something like `[email protected]`).
JSON_CONFIG_PATH: /app/conf/mock-oauth2-server.json
# Uncomment for direct access without proxy.
# We override default port 8080 since it is already used by adminer container.
#SERVER_PORT: 8081
# Uncomment for direct access without proxy.
#ports:
# - 8081:8081
#hostname: auth.talent.canada.test
volumes:
pgdata:
maintenancedata: