-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.dev.yml
67 lines (66 loc) · 2.42 KB
/
compose.dev.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
# TODO: possibly use only compose with 1 container with nodemon and tomcat
#
# this is a dev only compose file that will be used to start the services needed
# and provide live reload for the tomcat webapp by running npm run dev
#
# network mode exposes the service directly to the host, no mapping needed
# requires ports available on the host
services:
tomcat-webapp-boilerplate:
build:
dockerfile: ./Dockerfile
container_name: tomcat-webapp-boilerplate
env_file: ./.env
develop:
# watch allows to sync files from host to container
# When we run npm run dev, it will start the container and build the war.
# on every war change, it will sync the war to the container and tomcat automatically restarts the app
watch:
- action: sync+restart
path: "./build/libs/"
target: "/usr/local/tomcat/webapps/"
# for ease of use, we forward the tomcat port to the host
network_mode: host
########## postgres
postgresdev:
env_file: ./.env
image: postgres:latest@sha256:d0f363f8366fbc3f52d172c6e76bc27151c3d643b870e1062b4e8bfe65baf609
# restart: unless-stopped
network_mode: host
container_name: postgresdev
volumes:
# - ~/data/postgres:/var/lib/postgresql/data
- /tmp/db/psql:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${PSQL_USER} # default
POSTGRES_PASSWORD: ${PSQL_PASSWORD}
POSTGRES_DB: ${PSQL_DATABASE_NAME}
pgadmin:
container_name: pgadmin4_container
image: dpage/pgadmin4:latest@sha256:61fd25f428c155027fb2aa74b913d317af11a14f55e6135484b5e86a8840520b
# restart: unless-stopped
network_mode: host
depends_on:
- postgresdev
environment:
PGADMIN_DEFAULT_EMAIL: [email protected] #pragma: allowlist secret
PGADMIN_DEFAULT_PASSWORD: admin #pragma: allowlist secret
# PGADMIN_LISTEN_PORT: 9001
# ports:
# - 127.0.0.1:9001:80
########## redis
redisdev:
env_file: ./.env
image: redis/redis-stack:latest@sha256:dabd731cfebd2a7721ff1918257e08bff2b66963b938e796916cac53542ad003
# user: redis
# restart: unless-stopped
network_mode: host
# ports:
# - 127.0.0.1:6379:6379
# - 127.0.0.1:9002:8001 # redis insight
container_name: redisdev
# volumes:
# - /tmp/db/redis:/data
environment:
# default user is: default
- REDIS_ARGS=--save 60 1000 --appendonly yes --loglevel warning --requirepass ${REDIS_PASSWORD}