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(
|
var $default = array(
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
'persistent' => false,
|
'persistent' => false,
|
||||||
'host' => '172.17.0.1',
|
'host' => 'db',
|
||||||
'login' => 'cmc',
|
'login' => 'cmc',
|
||||||
'password' => 'xVRQI&cA?7AU=hqJ!%au',
|
'password' => 'xVRQI&cA?7AU=hqJ!%au',
|
||||||
'database' => 'cmc',
|
'database' => 'cmc',
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
ID=$(docker ps -f ancestor=cmc:latest -q)
|
ID=$(docker ps -f ancestor=cmc:latest -q)
|
||||||
docker kill $ID
|
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
|
image: nginx:latest
|
||||||
hostname: nginx
|
hostname: nginx
|
||||||
ports:
|
ports:
|
||||||
- "8888:80" # Expose HTTP traffic
|
- "80:80" # Expose HTTP traffic
|
||||||
volumes:
|
volumes:
|
||||||
- ./conf/nginx.conf:/etc/nginx/conf.d/cmc.conf
|
- ./conf/nginx-site.conf:/etc/nginx/conf.d/cmc.conf
|
||||||
# todo setup site config.
|
# todo setup site config.
|
||||||
- ./userpasswd:/etc/nginx/userpasswd:ro
|
- ./userpasswd:/etc/nginx/userpasswd:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue