Initial commit
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
services:
|
||||
nginx:
|
||||
container_name: ${APP_PREFIX}-${APP_ENV}-nginx
|
||||
image: nginx:${DEPLOY_NGINX_TAG:-1.29.8-alpine-slim}
|
||||
restart: always
|
||||
working_dir: /etc/nginx/conf.d
|
||||
env_file:
|
||||
- .env
|
||||
ports:
|
||||
- "${APP_PORT}:80"
|
||||
# depends_on:
|
||||
# api:
|
||||
# condition: service_started
|
||||
healthcheck:
|
||||
test: wget --no-verbose --tries=1 --spider http://localhost || exit 1
|
||||
interval: 5m
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 2m
|
||||
volumes:
|
||||
- ./services/nginx/hosts/${NGINX_HOSTS}:/etc/nginx/templates
|
||||
- ./services/nginx/.htpasswd:/etc/nginx/.htpasswd
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
networks:
|
||||
net:
|
||||
|
||||
db:
|
||||
container_name: ${APP_PREFIX}-${APP_ENV}-db
|
||||
image: postgres:${DEPLOY_POSTGRES_TAG:-18.3-alpine3.23}
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${DB_USERNAME}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DATABASE: ${DB_DATABASE}
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE}" ]
|
||||
interval: 5s
|
||||
timeout: 2s
|
||||
retries: 5
|
||||
volumes:
|
||||
- db:/var/lib/postgresql
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
networks:
|
||||
net:
|
||||
|
||||
volumes:
|
||||
db:
|
||||
name: ${APP_PREFIX}-${APP_ENV}-db
|
||||
|
||||
networks:
|
||||
net:
|
||||
name: ${APP_PREFIX}-${APP_ENV}-net
|
||||
Reference in New Issue
Block a user