-
Notifications
You must be signed in to change notification settings - Fork 370
/
docker-compose.yml
79 lines (72 loc) · 2.03 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
75
76
77
78
79
##
# 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.
#
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: onetime-app
depends_on:
- redis
env_file:
- .env
entrypoint: ["./bin/entrypoint.sh"]
# Makes it possible to interact with the container inside a shell.
stdin_open: true
tty: true
# The bin/entrypoint.sh script already launches the webapp by
# default but the command can be customized by including one
# here. When supplied as a list, each string will be properly
# escaped to avoid shell injection vulnerabilities.
#
# e.g.
#
# command: ["bundle", "exec", "thin", "-R", "config.ru", "start"]
logging:
driver: "json-file"
options:
max-size: "60m"
max-file: "3"
ports:
- 3000:3000
# Mounts the current working directory (.) into /app inside
# the container, which is where the webapp lives. This is a
# convenient way to develop in place without having to rebuild
# the image each time you make a change.
volumes:
- .:/app
redis:
image: redis:bookworm@sha256:01afb31d6d633451d84475ff3eb95f8c48bf0ee59ec9c948b161adb4da882053
container_name: onetime-redis
ports:
- 6379:6379
volumes:
- redis-data:/data
- ./etc/redis.conf:/usr/local/etc/redis/redis.conf
volumes:
redis-data: