Make project work with Podman

This commit is contained in:
2024-12-28 13:20:55 +00:00
parent 6d9c78d2e1
commit 6ccf84be26
6 changed files with 144 additions and 53 deletions

View File

@@ -12,7 +12,10 @@ services:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- fisk_static:${STATIC_ROOT}
# - /code/xf/static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
#ports:
# - "8000:8000" # uwsgi socket
# Dirty hack for Podman
@@ -62,10 +65,17 @@ services:
condition: service_started
collectstatic:
condition: service_started
networks:
- default
- xf
# networks:
# - default
# - xf
# - elastic
#network_mode: "pasta:-T,6380:6379"
deploy:
resources:
limits:
cpus: '0.1'
memory: 0.25G
network_mode: host
scheduling:
image: xf/fisk:prod
@@ -79,7 +89,10 @@ services:
- ${PORTAINER_GIT_DIR}:/code
- ${PORTAINER_GIT_DIR}/docker/uwsgi.ini:/conf/uwsgi.ini
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- fisk_static:${STATIC_ROOT}
# - /code/xf/static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
# Dirty hack for Podman
environment:
APP_PORT: "${APP_PORT}"
@@ -127,10 +140,17 @@ services:
condition: service_started
collectstatic:
condition: service_started
networks:
- default
- xf
# networks:
# - default
# - xf
# - db
#network_mode: "pasta:-T,6380:6379"
deploy:
resources:
limits:
cpus: '0.25'
memory: 0.25G
network_mode: host
migration:
image: xf/fisk:prod
@@ -143,7 +163,10 @@ services:
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- fisk_static:${STATIC_ROOT}
# - /code/xf/static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
# volumes_from:
# - tmp
# Dirty hack for Podman
@@ -184,6 +207,17 @@ services:
REDIS_HOST: "${REDIS_HOST}"
# env_file:
# - stack.env
# networks:
# - default
# - xf
# - db
#network_mode: "pasta:-T,6380:6379"
deploy:
resources:
limits:
cpus: '0.25'
memory: 0.25G
network_mode: host
collectstatic:
image: xf/fisk:prod
@@ -196,7 +230,10 @@ services:
volumes:
- ${PORTAINER_GIT_DIR}:/code
- ${APP_DATABASE_FILE}:/conf/db.sqlite3
- fisk_static:${STATIC_ROOT}
# - /code/xf/static:${STATIC_ROOT}
- type: bind
source: /code/run
target: /var/run
# volumes_from:
# - tmp
# Dirty hack for Podman
@@ -237,29 +274,53 @@ services:
REDIS_HOST: "${REDIS_HOST}"
# env_file:
# - stack.env
# networks:
# - default
# - xf
# - db
#network_mode: "pasta:-T,6380:6379"
deploy:
resources:
limits:
cpus: '0.25'
memory: 0.25G
network_mode: host
nginx:
image: nginx:latest
container_name: nginx_fisk
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
- fisk_static:${STATIC_ROOT}
# volumes_from:
# - tmp
networks:
- default
- xf
depends_on:
app:
condition: service_started
# nginx:
# image: nginx:latest
# container_name: nginx_fisk
# expose:
# - ${APP_PORT}
# 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
# - fisk_static:${STATIC_ROOT}
# - type: bind
# source: /code/run
# target: /var/run
# # volumes_from:
# # - tmp
# # networks:
# # - default
# # - xf
# depends_on:
# app:
# condition: service_started
# # forward the redis port from the host to the container as 6380
# # network_mode: "pasta:-t,9999"
# deploy:
# resources:
# limits:
# cpus: '0.25'
# memory: 0.25G
# network_mode: host
# volumes_from:
@@ -280,14 +341,21 @@ services:
image: redis
container_name: redis_fisk
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
- fisk_redis_data:/data
- type: bind
source: /code/run
target: /var/run
# networks:
# - default
# - xf
# - db
# volumes_from:
# - tmp
healthcheck:
@@ -295,6 +363,13 @@ services:
interval: 2s
timeout: 2s
retries: 15
# network_mode: "pasta:-T,6380:6379"
deploy:
resources:
limits:
cpus: '0.25'
memory: 0.25G
network_mode: host
# pyroscope:
# image: "pyroscope/pyroscope:latest"
@@ -303,11 +378,11 @@ services:
# command:
# - "server"
networks:
default:
driver: bridge
xf:
external: true
# networks:
# default:
# driver: bridge
# xf:
# external: true
# db:
# external: true