Última atividade 1753106552

Docker Standort Tracker

Code Snippets Bruto
1sudo mkdir dawarich
2cd dawarich
3sudo wget https://snippets.schächner.de/schBenedikt/f9213ad6fe1443cb88e658b305d744b0/download/HEAD/docker-compose.yml
4// Bei Bedarf Port/Username/Passwort anpassen
5sudo docker compose up -d
Login Bruto
1BENUTZERNAME
2demo@dawarich.app
3
4PASSWORT
5password
docker-compose.yml Bruto
1networks:
2 dawarich:
3services:
4 dawarich_redis:
5 image: redis:7.4-alpine
6 container_name: dawarich_redis
7 command: redis-server
8 networks:
9 - dawarich
10 volumes:
11 - dawarich_shared:/data
12 restart: always
13 healthcheck:
14 test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
15 interval: 10s
16 retries: 5
17 start_period: 30s
18 timeout: 10s
19 dawarich_db:
20 image: postgis/postgis:17-3.5-alpine
21 shm_size: 1G
22 container_name: dawarich_db
23 volumes:
24 - dawarich_db_data:/var/lib/postgresql/data
25 - dawarich_shared:/var/shared
26 # - ./postgresql.conf:/etc/postgresql/postgresql.conf # Optional, uncomment if you want to use a custom config
27 networks:
28 - dawarich
29 environment:
30 POSTGRES_USER: postgres
31 POSTGRES_PASSWORD: password
32 POSTGRES_DB: dawarich_development
33 restart: always
34 healthcheck:
35 test: [ "CMD-SHELL", "pg_isready -U postgres -d dawarich_development" ]
36 interval: 10s
37 retries: 5
38 start_period: 30s
39 timeout: 10s
40 # command: postgres -c config_file=/etc/postgresql/postgresql.conf # Use custom config, uncomment if you want to use a custom config
41 dawarich_app:
42 image: freikin/dawarich:latest
43 container_name: dawarich_app
44 volumes:
45 - dawarich_public:/var/app/public
46 - dawarich_watched:/var/app/tmp/imports/watched
47 - dawarich_storage:/var/app/storage
48 - dawarich_db_data:/dawarich_db_data
49 networks:
50 - dawarich
51 ports:
52 - 3000:3000
53 # - 9394:9394 # Prometheus exporter, uncomment if needed
54 stdin_open: true
55 tty: true
56 entrypoint: web-entrypoint.sh
57 command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
58 restart: on-failure
59 environment:
60 RAILS_ENV: development
61 REDIS_URL: redis://dawarich_redis:6379
62 DATABASE_HOST: dawarich_db
63 DATABASE_USERNAME: postgres
64 DATABASE_PASSWORD: password
65 DATABASE_NAME: dawarich_development
66 MIN_MINUTES_SPENT_IN_CITY: 60
67 APPLICATION_HOSTS: localhost
68 TIME_ZONE: Europe/London
69 APPLICATION_PROTOCOL: http
70 PROMETHEUS_EXPORTER_ENABLED: "false"
71 PROMETHEUS_EXPORTER_HOST: 0.0.0.0
72 PROMETHEUS_EXPORTER_PORT: 9394
73 SELF_HOSTED: "true"
74 STORE_GEODATA: "true"
75 logging:
76 driver: "json-file"
77 options:
78 max-size: "100m"
79 max-file: "5"
80 healthcheck:
81 test: [ "CMD-SHELL", "wget -qO - http://127.0.0.1:3000/api/v1/health | grep -q '\"status\"\\s*:\\s*\"ok\"'" ]
82 interval: 10s
83 retries: 30
84 start_period: 30s
85 timeout: 10s
86 depends_on:
87 dawarich_db:
88 condition: service_healthy
89 restart: true
90 dawarich_redis:
91 condition: service_healthy
92 restart: true
93 deploy:
94 resources:
95 limits:
96 cpus: '0.50' # Limit CPU usage to 50% of one core
97 memory: '4G' # Limit memory usage to 4GB
98 dawarich_sidekiq:
99 image: freikin/dawarich:latest
100 container_name: dawarich_sidekiq
101 volumes:
102 - dawarich_public:/var/app/public
103 - dawarich_watched:/var/app/tmp/imports/watched
104 - dawarich_storage:/var/app/storage
105 networks:
106 - dawarich
107 stdin_open: true
108 tty: true
109 entrypoint: sidekiq-entrypoint.sh
110 command: ['sidekiq']
111 restart: on-failure
112 environment:
113 RAILS_ENV: development
114 REDIS_URL: redis://dawarich_redis:6379
115 DATABASE_HOST: dawarich_db
116 DATABASE_USERNAME: postgres
117 DATABASE_PASSWORD: password
118 DATABASE_NAME: dawarich_development
119 APPLICATION_HOSTS: localhost
120 BACKGROUND_PROCESSING_CONCURRENCY: 10
121 APPLICATION_PROTOCOL: http
122 PROMETHEUS_EXPORTER_ENABLED: "false"
123 PROMETHEUS_EXPORTER_HOST: dawarich_app
124 PROMETHEUS_EXPORTER_PORT: 9394
125 SELF_HOSTED: "true"
126 STORE_GEODATA: "true"
127 logging:
128 driver: "json-file"
129 options:
130 max-size: "100m"
131 max-file: "5"
132 healthcheck:
133 test: [ "CMD-SHELL", "pgrep -f sidekiq" ]
134 interval: 10s
135 retries: 30
136 start_period: 30s
137 timeout: 10s
138 depends_on:
139 dawarich_db:
140 condition: service_healthy
141 restart: true
142 dawarich_redis:
143 condition: service_healthy
144 restart: true
145 dawarich_app:
146 condition: service_healthy
147 restart: true
148
149volumes:
150 dawarich_db_data:
151 dawarich_shared:
152 dawarich_public:
153 dawarich_watched:
154 dawarich_storage: