docker-compose working on my mac
This commit is contained in:
parent
0415b7faac
commit
4f1a38c84a
|
|
@ -9,7 +9,7 @@ class DATABASE_CONFIG {
|
|||
var $default = array(
|
||||
'driver' => 'mysql',
|
||||
'persistent' => false,
|
||||
'host' => '172.17.0.1',
|
||||
'host' => 'db',
|
||||
'login' => 'cmc',
|
||||
'password' => 'xVRQI&cA?7AU=hqJ!%au',
|
||||
'database' => 'cmc',
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
ID=$(docker ps -f ancestor=cmc:latest -q)
|
||||
docker kill $ID
|
||||
docker build . -t "cmc:latest"
|
||||
docker build . -t "cmc:latest" --platform linux/amd64
|
||||
|
|
|
|||
14
conf/nginx-site.conf
Normal file
14
conf/nginx-site.conf
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
server {
|
||||
server_name cmclocal;
|
||||
auth_basic_user_file /etc/nginx/userpasswd;
|
||||
auth_basic "Restricted";
|
||||
location / {
|
||||
proxy_pass http://cmc:80;
|
||||
proxy_read_timeout 300s;
|
||||
}
|
||||
|
||||
listen 0.0.0.0:80;
|
||||
# include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
|
|
@ -3,9 +3,9 @@ services:
|
|||
image: nginx:latest
|
||||
hostname: nginx
|
||||
ports:
|
||||
- "8888:80" # Expose HTTP traffic
|
||||
- "80:80" # Expose HTTP traffic
|
||||
volumes:
|
||||
- ./conf/nginx.conf:/etc/nginx/conf.d/cmc.conf
|
||||
- ./conf/nginx-site.conf:/etc/nginx/conf.d/cmc.conf
|
||||
# todo setup site config.
|
||||
- ./userpasswd:/etc/nginx/userpasswd:ro
|
||||
depends_on:
|
||||
|
|
|
|||
Loading…
Reference in a new issue