mirror of
https://github.com/iritmaximus/self-host.git
synced 2026-10-12 19:23:31 +03:00
105 lines
2.3 KiB
YAML
105 lines
2.3 KiB
YAML
version: "3"
|
|
services:
|
|
db:
|
|
build: ./db
|
|
volumes:
|
|
- ./data/db:/var/lib/postgresql/data
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: unsecure
|
|
|
|
adminer:
|
|
image: adminer
|
|
restart: always
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
brewery:
|
|
build:
|
|
context: ./services/brewery
|
|
dockerfile: Dockerfile.self-host
|
|
#command: sh -c "./bin/rails db:create; ./bin/rails db:prepare; ./bin/rails server -e production"
|
|
ports:
|
|
- "5555:3000"
|
|
restart: always
|
|
environment:
|
|
RAILS_ENV: "production"
|
|
SECRET_KEY_BASE: "b21eb384e49d7620a02c6288eb462b0e5dc82038b4d7af563f0f067d4071a3a3"
|
|
RAILS_LOG_TO_STDOUT: "true"
|
|
RAILS_SERVE_STATIC_FILES: "true"
|
|
DATABASE_URL: "postgresql://postgres:unsecure@db:5432/brewery"
|
|
depends_on:
|
|
- db
|
|
|
|
timetrials:
|
|
build: ./services/timetrials
|
|
ports:
|
|
- "5000:5000"
|
|
restart: always
|
|
environment:
|
|
POSTGRES_URL: "postgresql://postgres:unsecure@db:5432/timetrials"
|
|
TEST_POSTGRES_URL: "postgresql://postgres:unsecure@db:5432/timetrials_test"
|
|
SECRET_KEY: 56d580ba17a4a7b07a6810153eb8c20a
|
|
depends_on:
|
|
- db
|
|
|
|
reaktor-backend:
|
|
build: ./services/reaktor-backend
|
|
ports:
|
|
- "5050:5050"
|
|
restart: always
|
|
env_file:
|
|
- ./services/reaktor-backend/.env
|
|
|
|
pumppistatus:
|
|
build: ./services/pumppistatus
|
|
ports:
|
|
- "5550:5550"
|
|
#restart: always
|
|
env_file:
|
|
./services/pumppistatus/.env
|
|
|
|
radicale:
|
|
image: tomsquest/docker-radicale
|
|
container_name: radicale
|
|
ports:
|
|
- 127.0.0.1:5232:5232
|
|
init: true
|
|
read_only: true
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
cap_drop:
|
|
- ALL
|
|
cap_add:
|
|
- CHOWN
|
|
- SETUID
|
|
- SETGID
|
|
- KILL
|
|
environment:
|
|
TAKE_FILE_OWNERSHIP: true
|
|
#UID: 2999
|
|
#GID: 2999
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 256M
|
|
pids: 50
|
|
healthcheck:
|
|
test: curl -f http://127.0.0.1:5232 || exit 1
|
|
interval: 30s
|
|
retries: 3
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./data/radicale/:/data/
|
|
- ./radicale/config:/config:ro
|
|
|
|
# nginx:
|
|
# image: nginx
|
|
# ports:
|
|
# - 80:80
|
|
# - 443:443
|
|
# volumes:
|
|
# - ./nginx/conf/:/etc/nginx/:rw
|
|
# - /etc/letsencrypt/:/etc/letsencrypt/:rw
|