-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 789 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (33 loc) · 789 Bytes
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
services:
app:
build: .
restart: unless-stopped
container_name: wallpaper_server
volumes:
- ./wallpapers_server:/usr/src/app/server/wallpapers
networks:
- app_network
nginx:
image: nginx:latest
restart: unless-stopped
container_name: nginx_proxy
ports:
- "${PORT}:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
networks:
- app_network
environment:
- NGINX_USER=${NGINX_USER}
- NGINX_PASSWORD=${NGINX_PASSWORD}
command: >
/bin/bash -c "
echo -n '${NGINX_USER}:' >> /etc/nginx/.htpasswd &&
openssl passwd -apr1 '${NGINX_PASSWORD}' >> /etc/nginx/.htpasswd &&
nginx -g 'daemon off;'
"
networks:
app_network:
driver: bridge