/
docker-compose.yml
74 lines (68 loc) · 1.66 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
##
# ONETIME - DOCKER COMPOSE CONFIG - 2024-04-10
#
# Usage:
#
# $ docker-compose up -d redis
# $ docker-compose up --build onetime
#
# - or simply -
#
# $ docker-compose up
#
#
# Initial setup:
#
# Before running any docker-compose commands, copy the example
# configuration files into place on the host machine (the system
# that's running the docker daemon):
#
# $ cp --preserve --no-clobber ./etc/config.example ./etc/config
# $ cp --preserve --no-clobber .env.example .env
#
# Modify each file as needed. They're both mounted inside the
# onetime-app container so any changes you make "locally" on
# the host are reflected inside the container immediately
# without having to re-build.
#
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: onetime-app
depends_on:
- redis
env_file:
- .env
entrypoint: ["./bin/entrypoint.sh"]
stdin_open: true
tty: true
# The bin/entrypoint.sh script launches the webapp by default. If
# you want to customize the runtime config for your environment
# you can do so easily by uncommenting the command setting below.
#
# e.g.
#
# command: ["bundle", "exec", "thin", "-R", "config.ru", "-p", "4321", "start"]
logging:
driver: "json-file"
options:
max-size: "60m"
max-file: "3"
ports:
- 3000:3000
volumes:
- .:/app
- ./etc/config:/etc/config
redis:
image: redis:bookworm
container_name: onetime-redis
ports:
- 6379:6379
volumes:
- redis-data:/data
- ./etc/redis.conf:/usr/local/etc/redis/redis.conf
volumes:
redis-data: