Skip to content

Commit

Permalink
fix: explicitly set PostgreSQL image to version 16 in docker-compose …
Browse files Browse the repository at this point in the history
…files
  • Loading branch information
drikusroor committed Jan 7, 2025
1 parent 787e700 commit 4918c7e
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 107 deletions.
2 changes: 1 addition & 1 deletion docker-compose-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
db:
image: postgres
image: postgres:16
environment:
- POSTGRES_DB=${SQL_DATABASE}
- POSTGRES_USER=${SQL_USER}
Expand Down
212 changes: 106 additions & 106 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,109 +1,109 @@
# Docker-compose definition for development
services:
db:
image: postgres
environment:
- POSTGRES_DB=${SQL_DATABASE}
- POSTGRES_USER=${SQL_USER}
- POSTGRES_PASSWORD=${SQL_PASSWORD}
- PGHOST=${SQL_HOST}
- PGPORT=${SQL_PORT}
- PGUSER=${SQL_USER}
- PGDATABASE=${SQL_DATABASE}
- PGPASSWORD=${SQL_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data/
- db_backup:/backups/
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 5
ip2country:
image: extrawurst/ip2country:latest
ports:
- 8854:5000
server:
build:
context: ./backend
dockerfile: DockerfileDevelop
target: base
depends_on:
db:
condition: service_healthy
ip2country:
condition: service_started
volumes:
- type: bind
source: ./backend
target: /server
environment:
- AML_ALLOWED_HOSTS=${AML_ALLOWED_HOSTS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- AML_DEBUG=${AML_DEBUG}
- BASE_URL=${BASE_URL}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- AML_LOCATION_PROVIDER=${AML_LOCATION_PROVIDER}
- SENTRY_DSN=${SENTRY_DSN}
- SQL_DATABASE=${SQL_DATABASE}
- SQL_USER=${SQL_USER}
- SQL_PASSWORD=${SQL_PASSWORD}
- SQL_HOST=${SQL_HOST}
ports:
- 8000:8000
command: bash -c "python manage.py migrate && python manage.py bootstrap && python manage.py runserver 0.0.0.0:8000"
client:
build:
context: ./frontend
dockerfile: DockerfileDevelop
volumes:
- type: bind
source: ./frontend/src
target: /client/src
- type: bind
source: ./frontend/public
target: /client/public
- type: bind
source: ./frontend/.storybook
target: /client/.storybook
- type: bind
source: ./frontend/tsconfig.json
target: /client/tsconfig.json
- type: bind
source: ./frontend/tsconfig.node.json
target: /client/tsconfig.node.json
- type: bind
source: ./frontend/vite-env.d.ts
target: /client/vite-env.d.ts
- type: bind
source: ./frontend/vite.config.ts
target: /client/vite.config.ts
- type: bind
source: ./frontend/vitest.config.ts
target: /client/vitest.config.ts
- type: bind
source: ./frontend/index.html
target: /client/index.html
environment:
- VITE_API_ROOT=${FRONTEND_API_ROOT}
- VITE_EXPERIMENT_SLUG=${FRONTEND_EXPERIMENT_SLUG}
- VITE_AML_HOME=${FRONTEND_AML_HOME}
- VITE_LOGO_URL=${FRONTEND_LOGO_URL}
- VITE_HTML_FAVICON=${FRONTEND_HTML_FAVICON}
- VITE_HTML_PAGE_TITLE=${FRONTEND_HTML_PAGE_TITLE}
- VITE_HTML_OG_DESCRIPTION=${FRONTEND_HTML_OG_DESCRIPTION}
- VITE_HTML_OG_IMAGE=${FRONTEND_HTML_OG_IMAGE}
- VITE_HTML_OG_TITLE=${FRONTEND_HTML_OG_TITLE}
- VITE_HTML_OG_URL=${FRONTEND_HTML_OG_URL}
- VITE_HTML_BODY_CLASS=${FRONTEND_HTML_BODY_CLASS}
- VITE_SENTRY_DSN=${FRONTEND_SENTRY_DSN}
- VITE_STRICT=${FRONTEND_STRICT}
ports:
- 3000:3000
command: yarn start
db:
image: postgres:16
environment:
- POSTGRES_DB=${SQL_DATABASE}
- POSTGRES_USER=${SQL_USER}
- POSTGRES_PASSWORD=${SQL_PASSWORD}
- PGHOST=${SQL_HOST}
- PGPORT=${SQL_PORT}
- PGUSER=${SQL_USER}
- PGDATABASE=${SQL_DATABASE}
- PGPASSWORD=${SQL_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data/
- db_backup:/backups/
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 5
ip2country:
image: extrawurst/ip2country:latest
ports:
- 8854:5000
server:
build:
context: ./backend
dockerfile: DockerfileDevelop
target: base
depends_on:
db:
condition: service_healthy
ip2country:
condition: service_started
volumes:
- type: bind
source: ./backend
target: /server
environment:
- AML_ALLOWED_HOSTS=${AML_ALLOWED_HOSTS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- AML_DEBUG=${AML_DEBUG}
- BASE_URL=${BASE_URL}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- AML_LOCATION_PROVIDER=${AML_LOCATION_PROVIDER}
- SENTRY_DSN=${SENTRY_DSN}
- SQL_DATABASE=${SQL_DATABASE}
- SQL_USER=${SQL_USER}
- SQL_PASSWORD=${SQL_PASSWORD}
- SQL_HOST=${SQL_HOST}
ports:
- 8000:8000
command: bash -c "python manage.py migrate && python manage.py bootstrap && python manage.py runserver 0.0.0.0:8000"
client:
build:
context: ./frontend
dockerfile: DockerfileDevelop
volumes:
- type: bind
source: ./frontend/src
target: /client/src
- type: bind
source: ./frontend/public
target: /client/public
- type: bind
source: ./frontend/.storybook
target: /client/.storybook
- type: bind
source: ./frontend/tsconfig.json
target: /client/tsconfig.json
- type: bind
source: ./frontend/tsconfig.node.json
target: /client/tsconfig.node.json
- type: bind
source: ./frontend/vite-env.d.ts
target: /client/vite-env.d.ts
- type: bind
source: ./frontend/vite.config.ts
target: /client/vite.config.ts
- type: bind
source: ./frontend/vitest.config.ts
target: /client/vitest.config.ts
- type: bind
source: ./frontend/index.html
target: /client/index.html
environment:
- VITE_API_ROOT=${FRONTEND_API_ROOT}
- VITE_EXPERIMENT_SLUG=${FRONTEND_EXPERIMENT_SLUG}
- VITE_AML_HOME=${FRONTEND_AML_HOME}
- VITE_LOGO_URL=${FRONTEND_LOGO_URL}
- VITE_HTML_FAVICON=${FRONTEND_HTML_FAVICON}
- VITE_HTML_PAGE_TITLE=${FRONTEND_HTML_PAGE_TITLE}
- VITE_HTML_OG_DESCRIPTION=${FRONTEND_HTML_OG_DESCRIPTION}
- VITE_HTML_OG_IMAGE=${FRONTEND_HTML_OG_IMAGE}
- VITE_HTML_OG_TITLE=${FRONTEND_HTML_OG_TITLE}
- VITE_HTML_OG_URL=${FRONTEND_HTML_OG_URL}
- VITE_HTML_BODY_CLASS=${FRONTEND_HTML_BODY_CLASS}
- VITE_SENTRY_DSN=${FRONTEND_SENTRY_DSN}
- VITE_STRICT=${FRONTEND_STRICT}
ports:
- 3000:3000
command: yarn start
volumes:
db_data:
db_backup:
db_data:
db_backup:

0 comments on commit 4918c7e

Please sign in to comment.