Update to work with Podman

This commit is contained in:
2025-01-23 11:32:13 +00:00
parent 86fb2ac593
commit b16db665e5
5 changed files with 99 additions and 274 deletions

View File

@@ -2,7 +2,7 @@ version: "2.2"
services:
app:
image: pathogen/neptune:latest
image: xf/neptune:latest
container_name: neptune
build:
context: .
@@ -11,9 +11,11 @@ services:
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
#- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- neptune_static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
# env_file:
# - stack.env
environment:
@@ -96,13 +98,14 @@ services:
condition: service_started
collectstatic:
condition: service_started
networks:
- default
- xf
- db
# networks:
# - default
# - xf
# - db
network_mode: host
processing:
image: pathogen/neptune:latest
image: xf/neptune:latest
container_name: processing_neptune
build:
context: .
@@ -112,9 +115,11 @@ services:
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
#- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- neptune_static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
environment:
# General application settings
APP_PORT: "${APP_PORT}"
@@ -197,13 +202,14 @@ services:
condition: service_started
collectstatic:
condition: service_started
networks:
- default
- xf
- db
# networks:
# - default
# - xf
# - db
network_mode: host
scheduling:
image: pathogen/neptune:latest
image: xf/neptune:latest
container_name: scheduling_neptune
build:
context: .
@@ -213,9 +219,11 @@ services:
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
#- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- neptune_static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
environment:
# General application settings
APP_PORT: "${APP_PORT}"
@@ -298,13 +306,14 @@ services:
condition: service_started
collectstatic:
condition: service_started
networks:
- default
- xf
- db
# networks:
# - default
# - xf
# - db
network_mode: host
migration:
image: pathogen/neptune:latest
image: xf/neptune:latest
container_name: migration_neptune
build:
context: .
@@ -313,9 +322,11 @@ services:
command: sh -c '. /venv/bin/activate && python manage.py migrate --noinput'
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
#- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- neptune_static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
environment:
# General application settings
APP_PORT: "${APP_PORT}"
@@ -394,13 +405,14 @@ services:
depends_on:
redis:
condition: service_healthy
networks:
- default
- xf
- db
# networks:
# - default
# - xf
# - db
network_mode: host
collectstatic:
image: pathogen/neptune:latest
image: xf/neptune:latest
container_name: collectstatic_neptune
build:
context: .
@@ -409,9 +421,11 @@ services:
command: sh -c '. /venv/bin/activate && python manage.py collectstatic --noinput'
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
#- ${APP_LOCAL_SETTINGS}:/code/app/local_settings.py
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- neptune_static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
# volumes_from:
# - tmp
environment:
@@ -490,33 +504,34 @@ services:
depends_on:
redis:
condition: service_healthy
networks:
- default
- xf
- db
# networks:
# - default
# - xf
# - db
network_mode: host
nginx:
image: nginx:latest
container_name: nginx_neptune
ports:
- ${APP_PORT}:9999
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/nginx/conf.d/${OPERATION}.conf:/etc/nginx/conf.d/default.conf
- neptune_static:${STATIC_ROOT}
# volumes_from:
# - tmp
networks:
- default
- xf
depends_on:
app:
condition: service_started
# nginx:
# image: nginx:latest
# container_name: nginx_neptune
# ports:
# - ${APP_PORT}:9999
# ulimits:
# nproc: 65535
# nofile:
# soft: 65535
# hard: 65535
# volumes:
# - ${PORTAINER_GIT_DIR}:/code
# - ${PORTAINER_GIT_DIR}/docker/nginx/conf.d/${OPERATION}.conf:/etc/nginx/conf.d/default.conf
# - neptune_static:${STATIC_ROOT}
# # volumes_from:
# # - tmp
# networks:
# - default
# - xf
# depends_on:
# app:
# condition: service_started
# tmp:
# image: busybox
@@ -529,14 +544,17 @@ services:
image: redis
container_name: redis_neptune
command: redis-server /etc/redis.conf
ulimits:
nproc: 65535
nofile:
soft: 65535
hard: 65535
# ulimits:
# nproc: 65535
# nofile:
# soft: 65535
# hard: 65535
volumes:
- ${PORTAINER_GIT_DIR}/docker/redis.conf:/etc/redis.conf
- neptune_redis_data:/data
- type: bind
source: /code/run
target: /var/run
# volumes_from:
# - tmp
healthcheck:
@@ -544,18 +562,18 @@ services:
interval: 2s
timeout: 2s
retries: 15
networks:
- default
- xf
# networks:
# - default
# - xf
networks:
default:
driver: bridge
xf:
external: true
db:
external: true
# networks:
# default:
# driver: bridge
# xf:
# external: true
# db:
# external: true
volumes:
neptune_static: {}
# neptune_static: {}
neptune_redis_data: {}