# Question
Title: Docker-compose containers can't connect to each other
According to the Docker Compose Docs: Networking:

> By default Compose sets up a single network for your app. Each container for a service joins the default network and is both *reachable* by other containers on that network, and *discoverable* by them at a hostname identical to the container name.
>
> For example, suppose your app is in a directory called `myapp`, and your `docker-compose.yml` looks like this:
>
> ```
> version: "3"
> services:
>   web:
>     build: .
>     ports:
>       - "8000:8000"
>     depends_on:
>       - db
>   db:
>     image: postgres
>     environment:
>       POSTGRES_PASSWORD: testpass
>     ports:
>       - "8001:5432"
>
> ```
>
> When you run docker-compose up, the following happens:
>
> * A network called `myapp_default` is created.
> * A container is created using `web`’s configuration. It joins the network `myapp_default` under the name `web`.
> * A container is created using `db`’s configuration. It joins the network `myapp_default` under the name `db`.

I put that exact `docker-compose.yml` in a directory with this `Dockerfile`:

```
FROM alpine
RUN ping -c 1 db

```

When I run `docker-compose up`, I get a connection error to the db container.

```
$ docker-compose up
Building web
Step 1/2 : FROM alpine
latest: Pulling from library/alpine
df20fa9351a1: Pull complete
Digest: sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321
Status: Downloaded newer image for alpine:latest
 ---> a24bb4013296
Step 2/2 : RUN ping -c 1 db
 ---> Running in cf64bfcb72eb
ping: bad address 'db'
ERROR: Service 'web' failed to build : The command '/bin/sh -c ping -c 1 db' returned a non-zero code: 1

```

If I put a node app in the Dockerfile, I can't make database connections to the db URI at `postgres://postgres:postgres@db/postgres` either.

I've tried using `links` and `depends_on` as well as the `healthcheck` for postgres advised in other SE answers. (EDIT: Added `depends_on` to compose file). Nothing has worked. Why can't I connect to the `db` container?

# Answer
The Dockerfile specifies how a container image is *built*. The Dockerfile’s `RUN` command is trying to ping the `db` container, which is not yet running during the build phase.

Once the container images have been created, compose will start the containers and they will be able to address each other via their service names (`db` and `web`).

To accomplish what you want, an adjustment to your Dockerfile will need to be made. Replace `RUN` with `CMD`. This will allow the container to execute your ping command when it launches.

```
FROM alpine
CMD ping -c 1 db

```

Now your `docker-compose up` will build the web image, launch the `db` container and then launch your `web` container which will successfully execute a ping:

```
> docker-compose up
Creating network "simple_default" with the default driver
Building web
Step 1/2 : FROM alpine
 ---> a24bb4013296
Step 2/2 : CMD ping -c 1 db
 ---> Running in 0c210f0936fd
Removing intermediate container 0c210f0936fd
 ---> 7c0ed50ad4e8
Successfully built 7c0ed50ad4e8
Successfully tagged simple_web:latest
WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating simple_db_1 ... done
Creating simple_web_1 ... done
Attaching to simple_db_1, simple_web_1

... output omitted

web_1  | PING db (172.19.0.2): 56 data bytes
web_1  | 64 bytes from 172.19.0.2: seq=0 ttl=64 time=0.218 ms
web_1  |
web_1  | --- db ping statistics ---
web_1  | 1 packets transmitted, 1 packets received, 0% packet loss
web_1  | round-trip min/avg/max = 0.218/0.218/0.218 ms
db_1   |
db_1   | Data page checksums are disabled.
db_1   |
db_1   | fixing permissions on existing directory /var/lib/postgresql/data ... ok
db_1   | creating subdirectories ... ok
db_1   | selecting dynamic shared memory implementation ... posix
db_1   | selecting default max_connections ... 100
db_1   | selecting default shared_buffers ... 128MB
db_1   | selecting default time zone ... Etc/UTC
db_1   | creating configuration files ... ok
db_1   | running bootstrap script ... ok
db_1   | performing post-bootstrap initialization ... ok
simple_web_1 exited with code 0

```
> 7 votes

---
Tags: docker-compose
---


# Question
Title: DNS Issues with Cloud formation template
I am trying to automate the creation of an EC2 instance with CloudFormation but am running into issues with DNS.

Once the instance is created it can't seem to resolve any hostnames. I try to ping a hostname, such as google.com, and it can't be resolved. However, it can ping IP addresses.

My template is below and I understand that there are some unused parameters which I intend to use later on:

```
{  "Description": "Create an EC2 instance by AWS CloudFormation",  "Parameters": {
"KeyName": {
  "MinLength": 1,
  "Type": "AWS::EC2::KeyPair::KeyName"
},
"BaseAmiId": {
  "Default": "ami-bd3ba0aa",
  "Type": "String"
},
"DomainAdminUser": {
  "Description": "User name for the account that will be added as Domain Administrator. This is separate from the default \"Administrator\" account",
  "Type": "String",
  "Default": "installer"
},
"DomainUserPassword": {
  "NoEcho": "true",
  "Description": "The Windows administrator account password",
  "Type": "String",
  "MinLength": "8",
  "MaxLength": "41"
},
"DomainDNSName": {
  "Description": "Fully qualified domain name (FQDN) of the forest root domain",
  "Type": "String",
  "Default": "test.com"
},
"DomainNetBiosName": {
  "Description": "Netbios name for the domain",
  "Type": "String",
  "Default": "test"
}  },  "Resources": {
"SecurityGroupDemoSvrTraffic": {
  "Type": "AWS::EC2::SecurityGroup",
  "Properties": {
    "GroupName": "sgDemoSvr",
    "SecurityGroupIngress": [
      {
        "IpProtocol": "tcp",
        "FromPort": 3389,
        "ToPort": 3389,
        "CidrIp": "0.0.0.0/0",
        "Description": "For traffic from Internet"
      }
    ],
    "GroupDescription": "Security Group for demo server",
    "VpcId": "vpc-05eabde4dbadsf09"
  }
},
"EC2Instance": {
  "Type": "AWS::EC2::Instance",
  "Properties": {
    "AvailabilityZone": "eu-west-2b",
    "BlockDeviceMappings": [
      {
        "DeviceName": "/dev/sda1",
        "Ebs": {
          "DeleteOnTermination": "true",
          "VolumeSize": "32",
          "VolumeType": "gp2"
        }
      }
    ],
    "ImageId": "ami-029c4f36a959979a7",
    "InstanceType": "t2.micro",
    "KeyName": {
        "Ref": "KeyName"
    },
    "NetworkInterfaces": [
      {
        "Description": "Primary network interface",
        "DeviceIndex": "0",
        "SubnetId": "subnet-0b3f36d19eb3sdfda",
        "AssociatePublicIpAddress": true,
        "GroupSet": [
          {
            "Ref": "SecurityGroupDemoSvrTraffic"
          }
        ]
      }
    ]
  }
}  }}

```

# Answer
> 1 votes
Which flavor of Linux are you using? (eg Ubuntu/Debian, RHEL/CentOS etc) Also which version? (eg Ubuntu started using the "netplan" configuration by default in 20.04)

At first glance, it looks like your DNS nameservers are hosed somehow.

And can you post the results for doing a: `netstat -nutpl`?

Look at which PID/Program Name is listening on port 53 (systemd-resolve? dnsmasq?) and check its nameserver configuration.

Maybe check here: `sudo cat /etc/resolv.conf`  and make sure the nameserver(s) listed there are what you think you should have them.

or check the DNS-related services are even running with something like:

Ubuntu: `sudo service systemd-resolved status` (NOTE BOTH of the 'd' endings)

CentOS/RHEL: `sudo service dnsmasq status`

(or whatever is using port 53, which is the default DNS port on most OSes)

# Answer
> 0 votes
The issue was due to the DNS ports not being configured properly. I had to configure port 53 in my security groups to get this to work.

---
Tags: amazon-web-services, automation, dns
---


# Question
Title: What are the "User Mode" tools in kubernetes lens?
I have been using kuberentes lense and noticed under the cluster settings page an optional package called "user mode". Does anybody know what this means?

# Answer
I have not used it, but the description in your image is understandable. It is adding RBAC (user permission) so that any user (also non-admins) can *list namespaces* (e.g. see all namespaces that exists within the cluster).

But it should not mean more than that, e.g. a user can not create a Deployment in a namespace he is not granted to.
> 1 votes

---
Tags: kubernetes
---


# Question
Title: Provision and configure Azure VM in private subnet (file, remote-exec, cloud-init, etc.)
(Originally posted to discuss.hashicorp.com)

I’m setting up a basic multi-tier infrastructure composed of two Azure VMs:

1. Web server (VM1) with public IP and private IP (subnet1)
2. Data server (**VM2**) in **private IP** only (subnet2)

Both VM-s are based on the vanilla Ubuntu Linux images available on Azure.

Obviously, it’s very easy to provision (`apt-get`, Bash scripting, etc.) and configure the Web server using the `file` or `remote-exec` provisioners. I have also experimented with the `clout-init` for that purpose.

Questions:

* What is the recommended method to provision and the data server?
* Is `cloud-init` the only option?

AFAIU, the Terraform provisioners running via SSH are not an option because the data server (**VM2**) is not available at public IP.

What I need to do on the **VM2** is:

* install some packages
* upload/edit some configuration files
* download some data files
* start some services

I’m running Terraform on Windows host, so I did not try the Ansible yet, but AFAIU it operates via SSH, similarly to the Terraform `file` or `remote-exec` provisioners.

# Answer
> 1 votes
Hashicorp recommends using provisioners only as a last resort. They recommend using the Azure VM custom\_data method, or cloud-init where available.

Ansible would likely be overkill unless you will need ongoing in-place configuration management. But there are ways to make VM2 securely accessible to Ansible or provsioners if necessary.

---
Tags: terraform, azure, provisioning, cloud-init
---


# Question
Title: How to gain console access to a MySQL server running on a docker container from the host?
I thought I had this working a few minutes ago:

```
root $
root $ docker container ls
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                   PORTS                               NAMES
9eb4a18def01        mysql/mysql-server:latest   "/entrypoint.sh mysq…"   6 minutes ago       Up 6 minutes (healthy)   0.0.0.0:3306->3306/tcp, 33060/tcp   mysql
root $
root $ mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root $
root $ docker exec -ti --user root mysql bash
bash-4.2#
bash-4.2# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 8.0.21 MySQL Community Server - GPL

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> SELECT host, user FROM mysql.user;
+-----------+------------------+
| host      | user             |
+-----------+------------------+
| localhost | healthchecker    |
| localhost | mysql.infoschema |
| localhost | mysql.session    |
| localhost | mysql.sys        |
| localhost | root             |
+-----------+------------------+
5 rows in set (0.00 sec)

mysql>
mysql> CREATE USER 'user'@'%' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.09 sec)

mysql>
mysql> GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.13 sec)

mysql>
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.05 sec)

mysql>
mysql> SELECT host, user FROM mysql.user;
+-----------+------------------+
| host      | user             |
+-----------+------------------+
| %         | user             |
| localhost | healthchecker    |
| localhost | mysql.infoschema |
| localhost | mysql.session    |
| localhost | mysql.sys        |
| localhost | root             |
+-----------+------------------+
6 rows in set (0.00 sec)

mysql>
mysql> exit
Bye
bash-4.2#
bash-4.2# mysql -u user -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 8.0.21 MySQL Community Server - GPL

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> exit
Bye
bash-4.2#
bash-4.2# exit
exit
root $
root $ mysql -u user -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
root $

```

but clearly not. How do I check that the container connection is accessible? I'm trying:

```
root $
root $ telnet 127.0.0.1 3306
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
J
8.0.21%#%T:/]T�e-r&UR([/caching_sha2_password
^CConnection closed by foreign host.
root $
root $
root $ telnet 127.0.0.1 33060
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
root $

```

but that seems a bit odd.

# Answer
> 2 votes
Solution:

```
root $
root $ mysql -h localhost -P 3306 --protocol=tcp -u user -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 17
Server version: 8.0.21 MySQL Community Server - GPL

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
mysql> SELECT host, user FROM mysql.user;
+-----------+------------------+
| host      | user             |
+-----------+------------------+
| %         | user             |
| localhost | healthchecker    |
| localhost | mysql.infoschema |
| localhost | mysql.session    |
| localhost | mysql.sys        |
| localhost | root             |
+-----------+------------------+
6 rows in set (0.00 sec)

mysql>

```

per:

https://stackoverflow.com/q/33001750/4531180

---
Tags: docker, containers, databases, images, mysql
---


# Question
Title: Is there any other approach for tagging git branch using pipeline without credentials in pipeline code?
I was trying to tag a git branch using Gitlab CI. With the help of this answer from this community,

> How to tag source code using gitlabCI

I can successfully tag a git branch from Gitlab CI pipeline. But In that method, I noticed that we need to provide the gitlab credentials in that pipeline code. I know, we can pass that as Gitlab environment variables.

But I just need to know, is there any other method to do this operation? With a Key or Token or something rather than direct username and password?

Not sure whether my question legit? I was thinking about the security side of it.

# Answer
I believe that what you need is just a Personal Access Token, or if you're a maintainer, possibly a Deploy Token. It's *much* safer than embedding user credentials.
> 2 votes

---
Tags: git, gitlab, cicd
---


title: AWS hosting of SPA Web App

text:
# Question
Title: AWS hosting of SPA Web App
I have just recently started to consider using AWS for my SPA Web Apps. And I have read a lot about different types of how web apps could be hosted on AWS. I have looked into Lambda, S3 Static hosting. EC2. But can't seem to figure out how to exploit AWS and it services the best possible way.

My Web App consists of a front-end written in Vue js. Which uses a Backend API written in Laravel. The front-end and backend are isolation so they don't have to be placed on the same machine. So I guess that could bring some good opportunities for using the different AWS products? The Database is only connected to the Backend Api so the Frontend is static. I'm also openminded to changing to another type of database if that would fit better into the AWS environment. But I don't know if I should separate the Frontend and API into different services.

Thanks in advance!

# Answer
> 1 votes
The AWS answer would be to use appropriate services for each component.

E.g. Put the database on an RDS - they have multiple choices. Deploy the front-end using Fargate and Lambda.

There are 2 issues to consider:

**1. The learning curve.**

Getting up to speed on AWS technology - and keeping up with them as they make minor tweaks that break lagacy deployments - can get very expensive, time-wise.

OTOH, once you're an expert at these technologies, you can leverage them with amazing results.

**2. The costs:**

While you develop you will be using the free-tier mostly, and the costs will be minimal.

Once you move into production, you have have to start using "real" machinery, and even if you don't, most services have an expiration for their free tier: 12 months and/or a certain amount of usage.

At that point the costs start ballooning. from small-change to 3 or even 4-figure numbers for a small installation.

---

The other approach is to do it the way you'd do it without AWS.

You didn't give me much details, but if you're deploying something simple, you may want to spin up an EC2 instance, install a LAMP server and use it for both front & back end.

You can then use the Lifecycle Manager to back up the entire machine daily.

However, if you have to scale this up in a big way, you'll have to start from scratch.

---

So, what do you choose?

The answer depends on your resources: time, money and manpower, as well as how you see this growing from a one-off project to a long term heavily used installation that needs redundancy, load balancing and the ability to scale dynamically.

You could also look at something like AWS Beanstalk, which is easier to implement and redeploy, but not as dynamic, as their serverless approach.

---
Tags: amazon-web-services
---


# Question
Title: Can't get either Postgres permissions or PVC working in AKS
These are pretty much the steps I have followed in order. Basically what is outlined in the documentation:

https://docs.microsoft.com/en-us/azure/aks/azure-files-dynamic-pv

1. `azure-storage-claim.yaml`

```
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: test-app-sc
provisioner: kubernetes.io/azure-file
mountOptions:
  - dir_mode=0777
  - file_mode=0777
  - uid=1000
  - gid=1000
  - mfsymlinks
  - nobrl
  - cache=none
parameters:
  skuName: Standard_LRS
  location: westus

```
2. `azure-storage.yaml`

```
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: test-app-storage
spec:
  accessModes:
    - ReadWriteMany
  storageClassName: test-app-sc
  resources:
    requests:
      storage: 15Gi<br>

```

PVC is now setup.

Changed the mountPath per the Postgres image documentation:

> PGDATA
>
> This optional variable can be used to define another location - like a subdirectory - for the database files. The default is /var/lib/postgresql/data, but if the data volume you're using is a filesystem mountpoint (like with GCE persistent disks), Postgres initdb recommends a subdirectory (for example /var/lib/postgresql/data/pgdata ) be created to contain the data.
>
> This is an environment variable that is not Docker specific. Because the variable is used by the postgres server binary (see the PostgreSQL docs), the entrypoint script takes it into account.

Based on that, I have my `postgres.yaml` setup like the following:

```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: postgres-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: postgres
  template:
    metadata:
      labels:
        component: postgres
    spec:
      containers:
        - name: postgres
          image: postgres
          # I don't know, someone suggested this, but doesn't work apparently
          securityContext:
            runAsUser: 0
          ports:
            - containerPort: 5432
          env:
            - name: POSTGRES_DB
              valueFrom:
                secretKeyRef:
                  name: test-app-secrets
                  key: PGDATABASE
            - name: POSTGRES_USER
              valueFrom:
                secretKeyRef:
                  name: test-app-secrets
                  key: PGUSER
            - name: POSTGRES_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: test-app-secrets
                  key: PGPASSWORD
            - name: POSTGRES_INITDB_ARGS
              value: "-A md5"
            - name: PGDATA
              value: /var/lib/postgresql/data/pgdata
          volumeMounts:
            - name: postgres-storage
              mountPath: /var/lib/postgresql/data/pgdata
              subPath: postgres-storage
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: test-app-storage
---
apiVersion: v1
kind: Service
metadata:
  name: postgres-cluster-ip-service
spec:
  type: ClusterIP
  selector:
    component: postgres
  ports:
    - port: 1423
      targetPort: 5432

```

You get the error:

```
chmod: changing permissions of '/var/lib/postgresql/data/pgdata': Operation not permitted

```

So with either of that as the Dockerfile:

```
FROM postgres:11-alpine
EXPOSE 5432
RUN /bin/bash -c 'chmod 777 /var/lib/postgresql/data'
RUN /bin/bash -c 'chmod 777 /var/lib/postgresql/data/pgdata'

```

Or

```
FROM postgres:11-alpine
EXPOSE 5432

```

It doesn't really matter, you still get the same type of error by doing any the following:

```
            ...
            - name: POSTGRES_INITDB_ARGS
              value: "-A md5"
          volumeMounts:
            - name: postgres-storage
              mountPath: /var/lib/postgresql/data/pgdata
              subPath: postgres-storage
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: test-app-storage
     ...<br>

```

Results in the following error:

```
The files belonging to this database system will be owned by user "postgres". This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: error: directory "/var/lib/postgresql/data" exists but is not empty If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".

```

Try this:

```
            ...
            - name: POSTGRES_INITDB_ARGS
              value: "-A md5"
          volumeMounts:
            - name: postgres-storage
              mountPath: /var/lib/postgresql/data
              subPath: postgres-storage
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: test-app-storage
     ...

```

And it results in this:

```
chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted

```

Try this:

```
            ...
            - name: POSTGRES_INITDB_ARGS
              value: "-A md5"
              value: "-D /var/lib/postgresql/data/pgdata"
          volumeMounts:
            - name: postgres-storage
              mountPath: /var/lib/postgresql/data/pgdata
              subPath: postgres-storage
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: test-app-storage
     ...

```

And it results in this:

```
The files belonging to this database system will be owned by user "postgres". This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: error: could not change permissions of directory "/var/lib/postgresql/data/pgdata": Operation not permitted fixing permissions on existing directory /var/lib/postgresql/data/pgdata ...

So nothing seems to work that I've tried and following the documentation where I can.

```

Someone suggested to get rid of the volume mounts like so:

```
            ...
            - name: POSTGRES_INITDB_ARGS
              value: "-A md5"
            - name: PGDATA
              value: /var/lib/postgresql/data/pgdata
      volumes:
        - name: postgres-storage
          persistentVolumeClaim:
            claimName: test-app-storage
     ...

```

Which, hey, that actually works! But doesn't persist data given it just uses the Pod storage so is pretty pointless:

And sure enough when you create a table in Postgres, destroy the Pod, and then redeploy it, of course the table is no longer there.

So more than likely I'm doing something wrong, but I've been following the documentation and seems like this should work.

Where are things going wrong?

**EDIT: Permissions in Pod**

Apparently it is a permissions issue that occurs when `PGDATA` is the same directory as `mountPath`. For example:

```
  ...
  - name: PGDATA
    value: /var/lib/postgresql-data
volumeMounts:
  - name: test-app-storage
    mountPath: /var/lib/postgresql-data
    subPath: postgres-storage
...

or

  ...
  # if PGDATA is not specified it defaults to /var/lib/postgresql/data
  # - name: PGDATA
  #   value: /var/lib/postgresql-data
volumeMounts:
  - name: test-app-storage
    mountPath: /var/lib/postgresql/data
    subPath: postgres-storage
...

```

Something like this where they do not match will create the Pod, but uses Pod storage which I obviously don't want:

```
  # Thus /var/lib/postgresql/data
  # - name: PGDATA
  #   value: /var/lib/postgresql-data
volumeMounts:
  - name: test-app-storage
    mountPath: /var/lib/postgresql-data
    subPath: postgres-storage

```

Permissions `ls -l` looks like this:

```
$ ls -l

drwxr-xr-x 1 root     root     4096 Feb  2 06:06 apt
drwxr-xr-x 1 root     root     4096 Feb  2 06:07 dpkg
drwxr-xr-x 2 root     root     4096 Feb  2 06:06 exim4
drwxr-xr-x 2 root     root     4096 Aug 28  2018 logrotate
drwxr-xr-x 2 root     root     4096 Nov 10 12:17 misc
drwxr-xr-x 2 root     root     4096 Jan 30 00:00 pam
drwxr-xr-x 1 postgres postgres 4096 Feb  2 06:07 postgresql
drwxrwxrwx 2     1000     1000    0 Jan 31 21:46 postgresql-data
drwxr-xr-x 1 root     root     4096 Jan 30 00:00 systemd
drwxr-xr-x 3 root     root     4096 Feb  2 06:07 ucf

$ ls -l postgresql && ls -l postgresql/data && ls -l postgresql-data
total 4
drwx------ 19 postgres postgres 4096 Feb  5 23:28 data
total 124
drwx------ 6 postgres postgres  4096 Feb  5 23:28 base
drwx------ 2 postgres postgres  4096 Feb  5 23:29 global
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_commit_ts
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_dynshmem
-rw------- 1 postgres postgres  4281 Feb  5 23:28 pg_hba.conf
-rw------- 1 postgres postgres  1636 Feb  5 23:28 pg_ident.conf
drwx------ 4 postgres postgres  4096 Feb  5 23:33 pg_logical
drwx------ 4 postgres postgres  4096 Feb  5 23:28 pg_multixact
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_notify
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_replslot
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_serial
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_snapshots
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_stat
drwx------ 2 postgres postgres  4096 Feb  5 23:51 pg_stat_tmp
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_subtrans
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_tblspc
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_twophase
-rw------- 1 postgres postgres     3 Feb  5 23:28 PG_VERSION
drwx------ 3 postgres postgres  4096 Feb  5 23:28 pg_wal
drwx------ 2 postgres postgres  4096 Feb  5 23:28 pg_xact
-rw------- 1 postgres postgres    88 Feb  5 23:28 postgresql.auto.conf
-rw------- 1 postgres postgres 26588 Feb  5 23:28 postgresql.conf
-rw------- 1 postgres postgres    36 Feb  5 23:28 postmaster.opts
-rw------- 1 postgres postgres    94 Feb  5 23:28 postmaster.pid
total 0

```

The permissions for where it creates the data files is `postgres`. However, doing this, it doesn't map to Azure Files and the PVC. It just stays and is destroyed with the Pod.

I think what is happening is `mountPath` uses `root` and `PGDATA` uses `postgres`, and somehow `mountPath` is trying to use `postgres`???

Really, not sure and still lost as to how to resolve it.

**EDIT2**

Came across this answer:

https://stackoverflow.com/a/51203031/3123109

So added the following to mine:

```
- name: postgres
  image: postgres
  command:
  - /bin/chown
  - -R
  - "1000"
  - /var/lib/postgresql/data

```

But this generates a new error:

```
The selected container has not logged any messages yet.

```

Progress, I guess.

# Answer
> 4 votes
The following setup works for me. When using the `subPath` in `volumeMounts`, the permission issue is automatically addressed, as the user `postgres` owns the folder corresponding to the `subPath`.

```
    spec:
      ...
      containers:
        - ...
          volumeMounts:
            # need a subpath as postgres wants an empty folder (the mounted folder `/var/lib/postgresql/data` has a `lost+found` directory)
            # see https://stackoverflow.com/questions/51168558/how-to-mount-a-postgresql-volume-using-aws-ebs-in-kubernete
            # this is used together with the env var PGDATA = /var/lib/postgresql/data/pgdata (below)
            # the owner:group of this folder is 70:70 (postgres:postgres), done by this step in the docker image:
            # https://github.com/docker-library/postgres/blob/master/Dockerfile-alpine.template#L146
            - mountPath: /var/lib/postgresql/data
              subPath: pgdata
              name: my-postgres-pv
          ...
          env:
            # need to define PGDATA env var because not using the default /var/lib/postgresql/data, but a subpath under it.
            - name: PGDATA
              value: /var/lib/postgresql/data/pgdata
            ...

```

---
Tags: kubernetes, azure, postgresql, azure-kubernetes-service, persistent-volumes
---


title: How to deploy MySQL server repeatedly

text:
# Question
Title: How to deploy MySQL server repeatedly
From fifty-thousand feet, how are, for example, multiple `MySQL` containers handled?

In the context of my limited experience, simply running the container is insufficient, with additional configuration required. It just seems not quite so repeatable if, after running the container, it must be further tinkered with before any CRUD operations. Or is that just the process?

# Answer
> 1 votes
I think it depends on the context.

I feel your pain with regard to needing to tinker and tweak a MySQL/MariaDB instance. It's not extremely difficult to get an instance up and running and THEN populate the DB from, say, a mysqldump by attaching volumes to the MySQL instance either using a Dockerfile for the instance or by "manually" bash-ing into it and loading your tables, tweaking your network config, setting up complex user permissions, etc.

But it's usually a STRUGGLE to deploy a "ready to go" mysql instance from a docker-compose.yml in my initial experience using Docker Composer for a MySQL container in an app deployment, but it IS doable.

What kind of scale are you trying to achieve? Do you NEED Kubernetes or Docker Swarm? I think in the case of most apps, the answer is honestly no. You can almost always come up with a crafty workaround with ba(sh) scripts or RUN/CMD (Dockerfile) or command: (docker-compose).

Are you trying to support an automated deployment? or just get an app up and running? or trying to increase resilience? Increase capacity at scale?

---
Tags: docker, kubernetes, containers, docker-swarm, orchestration
---


title: Unit Test AWS Glue job in CodePipeline

text:
# Question
Title: Unit Test AWS Glue job in CodePipeline
I have an AWS Glue job written in Python that I would like to perform pyunit tests on. However, from reading and experimenting on my own, there seem to be quite a few dependencies on the Glue service, making this task very impractical if not impossible. My only thought would be to separate the non glue dependent functions in the job into a separate module to perform unit testing on.

Is unit testing with AWS Glue possible, and if so, what are the best practices for doing so?

# Answer
> 2 votes
Checkout this solution with codepipeline. https://aws.amazon.com/blogs/big-data/implement-continuous-integration-and-delivery-of-serverless-aws-glue-etl-applications-using-aws-developer-tools/

# Answer
> 1 votes
If you are unit testing, you should be mocking external dependencies like Spark and AWS Glue. Look into Python mocking frameworks like unittest.mock, monkeypatch and pytest-mock. Your unit tests should just test your code and how it interacts with Spark and AWS Glue. Your unit tests should not test Spark and AWS Glue functionality. Do that in your component and integration testing.

---
Tags: amazon-web-services, python, aws-codepipeline, unit-testing
---


# Question
Title: Why is environment variable mangled in docker compose environment file
Context: docker-compose to start several containers, including Gunicorn that calls a Flask app. I'm using an environment file `web/env.gunicorn` to store my Gunicorn startup configuration. This file contains

```
GUNICORN_CMD_ARGS="--bind=127.0.0.1:8001 --workers=3"

```

The problem is that `GUNICORN_CMD_ARGS` is not processed correctly somewhere in the pipeline. The error that I get when running `docker logs gunicorn` is

```
Error: '8001 --workers=3' is not a valid port number.

```

The question is, where in my setup are my assumptions wrong, thereby causing the environment variable to be mangled? The environment variable is accepted when run manually in a terminal. The docker compose file looks as follows

```
version: "3"
services:
#  nginx:
#    image: nginx:latest
#    ports:
#      - "80:80"
#    volumes:
#      - ./nginx:/etc/nginx/conf.d
#    depends_on:
#      - web

  web:
    build: ./web
    container_name: gunicorn
    ports:
      - "8001:8001"
    environment:
      - APP_CONFIG_FILE=../config/development.py
    env_file:
      - 'web/env.gunicorn'
    networks:
      - backend
    command: gunicorn thymedata:app
    depends_on:
      - influxdb
      - grafana

  influxdb:
    image: influxdb:latest
    container_name: influxdb
    ports:
      - "8086:8086"
    env_file:
      - 'influxdb/env.influxdb'
      - 'influxdb/secrets.influxdb'
    networks:
      - backend
    volumes:
      - influxdb-data:/var/lib/influxdb

  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    ports:
      - "3000:3000"
    env_file:
      - 'grafana/env.grafana'
      - 'grafana/secrets.grafana'
    networks:
      - backend
    volumes:
      - grafana-data:/var/lib/grafana
    depends_on:
      - influxdb

networks:
  backend:

volumes:
  influxdb-data:
  grafana-data:

```

# Answer
After reading the commands chapter and finding this sample, it looks like that the custom `GUNICORN_CMD_ARGS` could be omitted by just passing the arguments directly:

```
command: gunicorn thymedata:app --bind=127.0.0.1:8001 --workers=3

```

If one really would like to use variables then it could be done as follows:

```
command: gunicorn thymedata:app --bind=${GUNICORN_BIND_ADDRESS} --workers=${GUNICORN_WORKERS}

```

.env

```
GUNICORN_BIND_ADDRESS=127.0.0.1:8001
GUNICORN_WORKERS=3

```
> 2 votes

# Answer
I had a similar problem and this worked for me without it feeling like a hack...

**docker-compose.yml**:

```
version: '3'
services:
   web:
      build .
      environment:
      - GUNICORN_CMD_ARGS=--workers=0 --bind=0.0.0.0:8000 --timeout=10

```

*Note: add env GUNICORN\_CMD\_ARGS without quotes*

**Dockerfile**:

```
FROM python:3.6-slim
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
ENV GUNICORN_CMD_ARGS="--bind=0.0.0.0:8000 --workers=3"
CMD gunicorn app:app

```

*Note: run CMD gunicorn app:app without passing options via array or quotes*
> 3 votes

# Answer
In ran into this problem with my environment file with docker-compose, and I found the problem to be with the quotes.

If I put `GUNICORN_CMD_ARGS=--bind=127.0.0.1:8001 --workers=3` on the .env file the parameters are accepted without any issue, but if I put quotes around them the variable gets mangled by docker-compose.
> 0 votes

---
Tags: docker, docker-compose
---


title: How to Connect Docker Containers?

text:
# Question
Title: How to Connect Docker Containers?
In "What is a container?" the `docker` docs show the following nifty image:

For my scenario I have only App A and App B; let's designate them Alice and Bob. How do Alice and Bob communicate, generally and specifically? Using the KISS principle, concretely I'm using `MySQL` and `BaseX` from the docker hub.

The notion being for an `xquery` file residing on the host, which is then sent to the `BaseX` container for execution. This specific query is actually `SQL`, so the `MySQL` container will need to be queried for the result.

Does this necessitate port forwarding or other networking approaches? Volumes? Does this require an additional compose file composed of, in turn, `MySQL` and `BaseX`?

No doubt there are many possible approaches. What's the most pragmatic, from a learning perspective? Conceptually light, with a gradual learning curve.

One approach seems to utilize bridge networking:

Taking advantage of the fact that the containers can see each other.

This doesn't seem to me related to `REST`ful web services.

---

Looking at related questions, this might touch on a reverse proxy.

# Answer
I'm still fairly new to the Docker game, too, but I've got a few little projects that I do exactly what you are asking about. Through my own experience with trial & error (mostly error...) I would suggest using a docker-compose.yml with your network set to static internal IPs so each container will have predictable, repeatable results and IPs that you can configure your containers to communicate across.

I'm not familiar with `BaseX` but I have a sample situation using docker-compose `version: "3.7"` here that could easily run multiple apps and/or be added to or repurposed to fit your hypothetical.

This example docker-compose has the following:

* A separate container for populating my `app-volume` volume with the contents of a public GitHub repo.
* An Apache Web Server container with PHP-FPM enabled for a "selective backend" that gets built from a Dockerfile in the ~/dockerbuild directory.
* An nginx web server container used as a reverse proxy for all things PHP to be passed to Apache (but serves & caches pretty much everything else).
* A MariaDB container in the mix for the app DB that I populate with a mysqldump file after the app gets built.

This is a slimmed down version of my docker-compose.yml, so note that you can add a variety of things like `healthcheck:` and `command:` to fit your needs.

You execute with `docker-compose up -d --build` to both build and start your app in one command (but you'll probably want to create your own ba(.sh) file that you execute afterwards, too for those important finishing touches).

Take notice of `static-network`. And while I am using named volumes in the example, that's just a preference of mine.

```
version: "3.7"

services:

  github_repo_clone:
    image: debian:latest
    container_name: github_repo_clone
    networks:
      static-network:
        ipv4_address: 172.20.0.254

    command: bash -c "
        apt-get update &&
        apt-get install git -y &&
        rm -rf examplerepo &&
        git clone https://github.com/exampleuser/examplerepo.git &&
        rm -rf /var/www/vhosts/exampleuser/examplerepo &&
        mkdir -p /var/www/vhosts/exampleuser/examplerepo &&
        cp -rapv examplerepo/* /var/www/vhosts/exampleuser/examplerepo &&
        rm -rf examplerepo &&
        tail -f /dev/null
      "
    volumes:
     - app-volume:/var/www/vhosts

  apache_php-fpm_backend:
    container_name: debian-build-demo0
    build: ~/dockerbuild
    ports:
     - "8080:8080"
    networks:
      static-network:
        ipv4_address: 172.20.0.2
    volumes:
     - app-volume:/var/www/vhosts

  nginx_rp:
    image: nginx:latest
    container_name: nginx-build-demo0
    ports:
     - "80:80"
     - "443:443"
    networks:
      static-network:
        ipv4_address: 172.20.0.3
    volumes:
     - app-volume:/var/www/vhosts

  mariadb:
    restart: always
    image: mariadb:latest
    container_name: mariadb-build-demo0
    ports:
     - "3306:3306"
    networks:
      static-network:
        ipv4_address: 172.20.0.10
    environment:
     - MYSQL_ROOT_PASSWORD=4007p@$$w04d
     - MYSQL_USER=dbusernamegoeshere
     - MYSQL_PASSWORD=@p@$$w04d
     - MYSQL_DATABASE=dbnamegoeshere
    volumes:
     - app-volume:/var/www/vhosts
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
      timeout: 10s
      retries: 5

volumes:
  app-volume:
#    external: true

networks:
  static-network:
    driver: bridge
    ipam:
      driver: default
      config:
       - subnet: 172.20.0.0/16

```

My clean up command when I take the app down is kind of ugly, but not terribly difficult to read and goes something like this: `docker-compose down -v ; docker rmi -f dockerbuild_apache_php-fpm_backend:latest mariadb:latest nginx:latest debian:latest ; docker rmi -f $(docker images -q --filter "dangling=true") ; docker rmi -f $(docker images -q --filter label=stage=intermediate) ; docker volume prune -f;`

I think each "independent app" could (and probably should) have its own docker-compose and/or Dockerfiles, but you may find synergies with certain Dockerfiles that you can create custom `command:` instructions for (such as the git\_repo\_clone example) to be used & shared across multiple "apps".
> 1 votes

---
Tags: docker, docker-compose, containers, databases, volume
---


# Question
Title: Grafana Status Panel Plugin - genereate status box for each entry from a Prometheus querry
I am trying to create a dashboad out of process\_uptime\_seconds{namespace="$namespace"} querry from Spring Actuator. and Prometheus as datasource I am trying to build a single stat box menus that will show the status, but for each value from the request. So instead of singlestat I have tried using Status Panel. However I keep getting a single box generated. How can I create dynamically a separate box for each entry from the returned object?

# Answer
> 0 votes
So far I have upgraded from 6.6 to 7 and switched to the new Stat panel that managed to visualize properly. The limitation I was trying to avoid is that I can't control fonts.

---
Tags: prometheus, grafana, spring-boot
---


# Question
Title: Gradual rollout management for client applications
I want to rollout software to clients (1m+) devices in a gradual fashion due to high risk. Ideally i would be able to target users based on analytical data i posses and decide if they should receive the upgrade. Currently we are using our homegrown server calls but they don’t hook to any analytics. Ive done quite a bit of research and haven’t found venders providing this type of functionality. Are there platforms (sort of like the “app store”) which have ways to gradually rollout updates to client machines?

# Answer
> 0 votes
It sounds like you are talking about Canary Analysis ? If so, Spinnaker has deployment based on canary analysis built on, using metrics provided by the application telemetry. To quote the Spinnaker docs:

> Your application might send performance metrics which are published and available by default. You can also install a monitoring agent to collect more comprehensive metrics, and you can instrument your code to generate further metrics for that agent. In any case, you need to have access to a set of metrics, using some telemetry provider, which Kayenta can then use to make the canary judgment. Support is built in for Stackdriver, Datadog, Prometheus, Signalfx, and New Relic.

So, you use Spinnaker as a continuous deployment service and instrument the application with one of the supported mechanisms. Canary analysis can then be done to manage the roll-out of new version.

---
Tags: deployment, continuous-deployment, versioning
---


# Question
Title: How is it a good practice to version your helm charts for each deployment?
I'm trying to set up a process to release a web app with `helm` in my company and I can't find a satisfying way.

Basically each for each push in a feature branch, I want to:

1. Build a docker image and push it to a registry
2. Upgrade the app through `helm`

Step 1 is easy, we keep the Dockerfile in the sources, which makes sense because it allows developers to test the docker image and the CI can also build the image and push it automatically.

Step 2: I'm not sure. I was told it could be interesting to keep track of the deployment history and therefore to update the helm chart version for each deployment which seems do-able but I'm not sure I see the point because `helm history` already provides the info I guess?

Also it forces the CI to actually commit and push the new chart version itself!

My idea was to keep the helm chart in a separate repository with all our charts and to just use keep track of the changes of the chart but nothing to do with any deployments so: the CI could basically build the docker image, push it, clone the helm repository and do the following:

```
helm upgrade $APP_NAME --set image.tag=$APP_VERSION ./path/to/chart

```

(with APP\_VERSION being auto generated and matching the docker build tag)

I haven't seen this approach when reading about it, most people seems to keep their app version up to date in their helm charts and I'm wondering how is that supposed to work for continuous deployment?

# Answer
So, I actually ended up with the following strategy.

I separated the charts from the source code. Basically, I have a repository that tracks all the helm charts only

**Why?**

1. I wanted to have a repository representing my cluster(s) so it's easy to rebuild a cluster from it
2. I also wanted to keep track of the current version deployed. Basically, this repository is the truth of what is exactly deployed on the cluster(s) knowing that it tracks the tag of the docker image that is used for each app, so if I want to go back in time, I could just revert a commit or update the docker tag for one of the apps in this repo
3. Separation of concerns: developers don't have to care how the app is deployed, they basically only care about how to build a docker image that works

**How does that work?**

It depends on the project, but for our API server for ex, we have 3 version online: devel.api.mycompany.com staging.api.mycompany.com api.mycompany.com

1. a PR is validated and merged on the app repository
2. The app CD builds a docker image with a tag = current git sha and pushes it to our private docker registry
3. The app CD clones our charts repository and update the docker tag version for this app and pushes on the repo
4. The charts repo receives a push with a commit updating the docker tag of the app
5. The charts CD runs helm upgrade for this app, which deploys the new pod on the cluster (so using the new docker image version)

*Note: We use helmfile on the charts repository, so it's easy to update by cluster and by app or all together + runs lint etc etc.*

Not saying it's the best but we're currently satisfied so hope that helps.
> 4 votes

# Answer
Approach you are describing - where app version is substituted at `helm upgrade` command - is pretty popular as well. Maybe it's not well documented - I'm not sure about that.

Yet another approach that people use is doing `helm template` which would compile everything (including variable resolution) into fixed k8s definitions and then doing GitOps on that.

There is no universally accepted approach here among those 3 (1st being updating helm chart itself with new versions every time). So you should decide what works better for your use case.

One thing that is worth mentioning is versioning issue (disclaimer: I'm solving it with Reliza Hub, which I develop). Basically, you need some system which would tell you what version tag of each microservice to actually use on different environments. That problem may become quite complex, especially if you have many microservices and many environments.
> 4 votes

---
Tags: kubernetes, continuous-integration, continuous-deployment, cicd, helm
---


# Question
Title: devops - Optomizing gitlab cicd pipeline's caching
I have a gitlab yaml I've been working on for a bit and while everything works it seems like each job takes quite a bit longer than it should. I tend to think the culprit is that npm files are fetched every time rather than sharing the `node_modules` cache between jobs.

Short of creating my own docker image, how can I optimize this yaml in a way that reduces the bottlenecks ?

**gitlab .yaml**

```
image: node:10.19.0 # https://hub.docker.com/_/node/
# image: node:latest

cache:
  # untracked: true
  key: my-project
  # key: ${CI_COMMIT_REF_SLUG} # per branch
  # key:
  #   files:
  #     - package-lock.json # only update cache when this file changes (not working) @jkr
  paths:
    - .npm/
    - node_modules
    - build

stages:
  - prepare # prepares builds, makes build needed for testing
  - test # uses test:build specifically @jkr
  - build
  - deploy

# before_install:

before_script:
  - npm ci --cache .npm --prefer-offline

prepare:
  stage: prepare
  needs: []
  script:
    - npm install

test:
  stage: test
  needs: [prepare]
  except:
    - schedules
  tags:
    - linux
  script:
    - npm run build:dev
    - npm run test:cicd-deps
    - npm run test:cicd # runs puppeteer tests @jkr
  artifacts:
    reports:
      junit: junit.xml
    paths:
      - coverage/

build-staging:
  stage: build
  needs: [prepare]
  only:
    - schedules
  before_script:
    - apt-get update && apt-get install -y zip
  script:
    - npm run build:staging
    - zip -r build-staging.zip build
  # cache:
  #   paths:
  #     - build
  #   <<: *global_cache
  #   policy: push
  artifacts:
    paths:
      - build-staging.zip

deploy-serv1:
  stage: deploy
  needs: [build-staging]
  tags: [linux]
  only:
    - schedules
  #   # - branches@gitlab-org/gitlab
  before_script:
    - apt-get update && apt-get install -y lftp
  script:
    # temporarily using 'verify-certificate no'
    # for more on verify-certificate @jkr: https://www.versatilewebsolutions.com/blog/2014/04/lftp-ftps-and-certificate-verification.html
    # variables do not work with 'single quotes' unless they are "'surrounded by doubles'"
    - lftp -e "set ssl:verify-certificate no; open myserver.org; user $LFTP_USERNAME $LFTP_PASSWORD; mirror --reverse --verbose build/ /var/www/domains/dev/projects/my-project/build/; bye"
  # environment:
  #   name: staging
  #   url: http://dev.myserver.org/projects/my-project/build
  when: manual
  allow_failure: true

build-production:
  stage: build
  needs: [prepare]
  only:
    - schedules
  before_script:
    - apt-get update && apt-get install -y zip
  script:
    - npm run build:staging
    - zip -r build-prod.zip build
  # cache:
  #   paths:
  #     - build
  #   <<: *global_cache
  #   policy: push
  artifacts:
    paths:
      - build-prod.zip

deploy-serv2:
  stage: deploy
  needs: [build-production]
  tags: [linux]
  only:
    - schedules
    # - master
  before_script:
    - apt-get update && apt-get install -y lftp
  script:
    - sh deploy-prod
  environment:
    name: production
    url: http://www.my-project.org
  when: manual
  allow_failure: true

```

# Answer
> 3 votes
I highly recommend using npm ci instead of `npm install`. The slow part of installing npm modules is figuring out everything that needs to be installed. If you commit your package-lock.json and use `npm ci`, it skips that part entirely and just looks at your lockfile to download what's needed. It's significantly faster.

---
Tags: continuous-integration, yaml
---


# Question
Title: Dockerized node.js and bind mount permission problem
I have an interesting problem with node, docker-compose and local development using bind mounts.

I have a bind mount volume, called www-public, owned by my host node user (I created a node user and chowned the dir to node:node). The container (official node) is set up so it also run as node user. At some point in my node app, i need to write to this folder and i get the permission error. This seems strange at first, but it makes sense, because i figured then, that my host nodeuser has an uid of 1001 while my container node user has an id of 1000. If i just add this line to my Dockerfile:

```
RUN usermod -u 1001 node && groupmod -g 1001 node

```

The permission problem goes away.

How do i fix this in a way, that I don't hard code the container node user id to match the node user id on the host like i did with the upper RUN command.

# Answer
In your Dockerfile:

```
ARG UID=1000
ARG GID=1000

RUN usermod -u $UID node && groupmod -g $GID node

```

Then using `docker build`:

```
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) .

```

The `ARG` lines provide defaults. If you leave off the `--build-arg` flags, they will be used. If you do use the `--build-arg` flags values those will be used instead.
> 1 votes

# Answer
The Compose syntax allows you to specify `user: <uid>:<gid>` in the service's configuration block.

For example:

```
version: "3"
services:
  node-service:
    image: node
    user: 1001:1001

```

This will run the container as UID 1001 and GID 1001.
> 0 votes

---
Tags: docker, docker-compose, node.js, permissions
---


title: how to push an image to docker hub?

text:
# Question
Title: how to push an image to docker hub?
How do I push this image to `docker hub`?

```
root $
root $ docker images helloworld_web
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
helloworld_web      latest              3118807ab0e0        5 minutes ago       196MB
root $

```

It's just the sample from `docker`.

# Answer
> 1 votes
horribly insecure:

```
root $
root $ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: nicksaunders
Password:
WARNING! Your password will be stored unencrypted in /root/snap/docker/471/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
root $
root $ docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
helloworld_web               latest              3118807ab0e0        13 minutes ago      196MB
frappe/erpnext-nginx         latest              e417869e11ba        39 hours ago        414MB
frappe/erpnext-worker        latest              96559438dfec        40 hours ago        1.22GB
frappe/frappe-nginx          latest              3d006c375c6e        40 hours ago        410MB
frappe/frappe-worker         latest              961988528953        40 hours ago        1GB
frappe/frappe-socketio       latest              bca49f1b4a04        40 hours ago        180MB
frappe/bench                 latest              8c1bc9d3a572        40 hours ago        1.4GB
frappe/erpnext-docs-nginx    latest              7d117e2bd798        42 hours ago        428MB
frappe/erpnext-docs-worker   latest              a1c0b0511e92        42 hours ago        2.88GB
frappe/erpnext-worker        <none>              09be9dde8f8f        2 days ago          1.21GB
frappe/bench                 <none>              c775a49dee59        2 days ago          1.4GB
redis                        alpine              bd71e6db4a54        13 days ago         32.2MB
python                       3.7-alpine          295b051ee125        2 weeks ago         41.7MB
basex/basexhttp              latest              3339bf6bc898        3 weeks ago         226MB
twilio/twilio-java           latest              611ab7ece1cf        5 weeks ago         993MB
mysql                        latest              0d64f46acfd1        7 weeks ago         544MB
jetty                        latest              5f997007f18d        7 weeks ago         522MB
jitsi/web                    latest              1fad75476320        2 months ago        483MB
mysql/mysql-server           latest              8a3a24ad33be        2 months ago        366MB
hello-world                  latest              bf756fb1ae65        8 months ago        13.3kB
lukptr/erpnext7              latest              130f3d9f222f        14 months ago       3.59GB
root $
root $ docker tag helloworld_web nicksaunders/helloworld:firsttry
root $
root $ docker push nicksaunders/helloworld
The push refers to repository [docker.io/nicksaunders/helloworld]
fca41575e369: Pushed
40f0977ea685: Pushing [==================================================>]  12.08MB
f8b013a4d861: Pushed
1d6d0bace1b8: Pushing [====>                                              ]  13.03MB/143MB
aabee2d268fc: Pushed
22ee430ae506: Waiting
60faa6c61cf9: Waiting
cfd52085ef94: Waiting
408e53c5e3b2: Waiting
50644c29ef5a: Waiting

```

but seems to work.

---
Tags: docker, docker-compose, containers, images, dockerhub
---


# Question
Title: docker-compose up: Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
specific error:

```
ERROR: for traefik  Cannot start service traefik: driver failed programming external connectivity on endpoint frappe_docker_traefik_1 (9403a83dff1da9718f4bbe0bf9c308b7a69093a4aab714a45d542224e8c9679c): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
ERROR: Encountered errors while bringing up the project.

```

building the image:

```
root $
root $ git config remote.origin.url
https://github.com/frappe/frappe_docker.git
root $
root $ pwd
/home/nicholas/github/frappe_docker
root $
root $ whoami
root
root $
root $ docker compose-up
docker: 'compose-up' is not a docker command.
See 'docker --help'
root $
root $
root $ docker-compose up
Creating network "frappe_docker_default" with the default driver
Creating volume "frappe_docker_assets-vol" with default driver
Creating volume "frappe_docker_redis-queue-vol" with default driver
Creating volume "frappe_docker_redis-cache-vol" with default driver
Creating volume "frappe_docker_sites-vol" with default driver
Creating volume "frappe_docker_mariadb-vol" with default driver
Creating volume "frappe_docker_cert-vol" with default driver
Creating volume "frappe_docker_redis-socketio-vol" with default driver
Pulling redis-queue (redis:latest)...
latest: Pulling from library/redis
d121f8d1c412: Already exists
2f9874741855: Pull complete
d92da09ebfd4: Pull complete
bdfa64b72752: Pull complete
e748e6f663b9: Pull complete
eb1c8b66e2a1: Pull complete
Digest: sha256:1cfb205a988a9dae5f025c57b92e9643ec0e7ccff6e66bc639d8a5f95bba928c
Status: Downloaded newer image for redis:latest
Pulling erpnext-worker-long (frappe/erpnext-worker:edge)...
edge: Pulling from frappe/erpnext-worker
522a7372a4ae: Already exists
fe49c307ba58: Pull complete
087f00e219ec: Pull complete
252533adc0db: Pull complete
42192fcae2c8: Pull complete
f9385d54957d: Pull complete
6be927b22c8e: Pull complete
795eed272aec: Pull complete
77889f8e826e: Pull complete
eca6af02605b: Pull complete
d9d9fbb70016: Pull complete
1fec8e8d8c69: Pull complete
4f7588149326: Pull complete
adf49f8e4c64: Pull complete
39eba9b9af97: Pull complete
fc8a4e5ee278: Pull complete
197c0dd2b467: Pull complete
07a1ddc0cbd5: Pull complete
1f848d7ee176: Pull complete
9ff1b5719ccf: Pull complete
8242cccddfed: Pull complete
be819aea4ac8: Pull complete
f3bcc4e6c232: Pull complete
Digest: sha256:e1b9602163a9c0959d924315aaf3919aa2404baa88997f11073758dfe43c7714
Status: Downloaded newer image for frappe/erpnext-worker:edge
Pulling traefik (traefik:v2.2)...
v2.2: Pulling from library/traefik
cbdbe7a5bc2a: Pull complete
f16506d32a25: Pull complete
605303653d66: Pull complete
a9005a35b171: Pull complete
Digest: sha256:ea0aa8832bfd08369166baecd40b35fc58979df8f5dc5182e4e63ee6adbe66db
Status: Downloaded newer image for traefik:v2.2
Pulling mariadb (mariadb:10.3)...
10.3: Pulling from library/mariadb
e6ca3592b144: Pull complete
534a5505201d: Pull complete
990916bd23bb: Pull complete
c62d6bd206a2: Pull complete
ba34deb445c3: Pull complete
47b4f6570cf0: Pull complete
28b039c5139e: Pull complete
d9f0e67eb23f: Pull complete
69df87d9330c: Pull complete
420ae5e12220: Pull complete
7539ff915a5c: Pull complete
45aee0e8778e: Pull complete
694594587433: Pull complete
Digest: sha256:bc0a542b4b69b71b4dda09aaaec3cb57902f935fc1237ee9bd542a944a877ae8
Status: Downloaded newer image for mariadb:10.3
Pulling erpnext-nginx (frappe/erpnext-nginx:edge)...
edge: Pulling from frappe/erpnext-nginx
d121f8d1c412: Already exists
ebd81fc8c071: Already exists
655316c160af: Already exists
d15953c0e0f8: Already exists
2ee525c5c3cc: Already exists
998e31db18de: Pull complete
d6b501d3e02a: Pull complete
95b354c2b5ea: Pull complete
8ef9ced566c5: Pull complete
7359850e2e7d: Pull complete
b1ddb017a0ed: Pull complete
055262deb169: Pull complete
4155a56e936b: Pull complete
Digest: sha256:394dd647bf0d486afc689366dff7cac6fca9fd623c47ec55583d53581431b91c
Status: Downloaded newer image for frappe/erpnext-nginx:edge
Pulling frappe-socketio (frappe/frappe-socketio:edge)...
edge: Pulling from frappe/frappe-socketio
abb454610128: Already exists
3dfc5a66c517: Already exists
9d3cc0392eb2: Already exists
269452c05570: Already exists
4a5ad82bcf62: Already exists
d9e4710f1239: Pull complete
0cbfca669cac: Pull complete
c1659af7c53f: Pull complete
7d1fb7ca8900: Pull complete
5b751fa50a09: Pull complete
a51353f97821: Pull complete
db61d40e1d8f: Pull complete
Digest: sha256:43abae19ff0f2ab064bfae012c77b7515534a7294ea05c65738ce943818758ff
Status: Downloaded newer image for frappe/frappe-socketio:edge
Creating frappe_docker_redis-cache_1    ... done
Creating frappe_docker_redis-socketio_1 ... done
Creating frappe_docker_mariadb_1                ... done
Creating frappe_docker_erpnext-nginx_1  ... done
Creating frappe_docker_redis-queue_1     ... done
Creating frappe_docker_erpnext-python_1 ... done
Creating frappe_docker_traefik_1        ...
Creating frappe_docker_traefik_1                ... error
Creating frappe_docker_frappe-socketio_1 ...
Creating frappe_docker_erpnext-worker-long_1 ...
Creating frappe_docker_erpnext-schedule_1    ...
Creating frappe_docker_erpnext-worker-short_1 ...
Creating frappe_docker_site-creator_1           ... done
Creating frappe_docker_frappe-socketio_1        ... done
Creating frappe_docker_erpnext-worker-long_1    ... done
Creating frappe_docker_erpnext-schedule_1       ... done
Creating frappe_docker_erpnext-worker-short_1   ... done
Creating frappe_docker_erpnext-worker-default_1 ... done

ERROR: for traefik  Cannot start service traefik: driver failed programming external connectivity on endpoint frappe_docker_traefik_1 (9403a83dff1da9718f4bbe0bf9c308b7a69093a4aab714a45d542224e8c9679c): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
ERROR: Encountered errors while bringing up the project.
root $

```

and:

```
root $
root $ sudo netstat -pna | grep 443
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      892/nginx: master p
tcp        0      0 192.168.1.3:40868       172.217.3.174:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:34876       172.217.14.226:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:49400       198.252.206.25:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:45006       172.217.3.161:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:57728       99.84.66.47:443         ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:41922       216.58.193.67:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:41330       157.240.3.29:443        ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:55040       69.147.80.15:443        ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:54386       172.217.3.206:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:40868       104.16.24.34:443        ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:45212       172.217.14.194:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:58514       172.217.14.206:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:48780       216.58.193.66:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:54460       216.58.193.78:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:49406       198.252.206.25:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:48966       74.125.197.95:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:56798       98.137.11.143:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:43260       172.217.14.193:443      TIME_WAIT   -
tcp        0      0 192.168.1.3:43158       172.217.14.202:443      TIME_WAIT   -
tcp        0      0 192.168.1.3:43156       172.217.14.202:443      TIME_WAIT   -
tcp        0      0 192.168.1.3:46862       151.101.193.69:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:55550       192.0.73.2:443          ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:52392       172.217.3.194:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:34928       172.217.14.226:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:60420       172.217.3.195:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:48100       74.125.195.189:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:52396       172.217.3.194:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:48774       216.58.193.66:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:42918       192.184.69.141:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:53542       54.212.130.172:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:52372       172.217.3.194:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:34266       172.217.14.198:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:44174       216.58.217.34:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:59974       74.125.20.156:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:57814       99.84.66.47:443         ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:49482       198.252.206.25:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:39464       23.62.70.19:443         ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:35576       99.84.66.78:443         ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:59108       157.240.3.20:443        ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:43230       172.217.14.193:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:39030       172.217.3.164:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:39160       104.17.79.107:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:54458       216.58.193.78:443       ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:41854       172.217.3.170:443       ESTABLISHED 426645/firefox
tcp        1      0 192.168.1.3:53892       172.67.11.174:80        CLOSE_WAIT  446443/WebKitNetwor
tcp        0      0 192.168.1.3:45222       172.217.14.194:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:45108       54.70.109.38:443        ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:49452       198.252.206.25:443      ESTABLISHED 426645/firefox
tcp        0      0 192.168.1.3:48836       216.58.193.66:443       ESTABLISHED 426645/firefox
tcp6       0      0 :::443                  :::*                    LISTEN      892/nginx: master p
unix  2      [ ACC ]     STREAM     LISTENING     24632463 448102/containerd-s  @/containerd-shim/moby/adaa8c3f4f239d443191aa03c37d4f9b2dc5867f355327bf9ac454c04228c421/shim.sock@
unix  2      [ ACC ]     STREAM     LISTENING     21327443 1/systemd            /run/systemd/userdb/io.systemd.DynamicUser
unix  3      [ ]         SEQPACKET  CONNECTED     24588159 446443/WebKitNetwor
unix  3      [ ]         STREAM     CONNECTED     24212443 426457/python3
unix  3      [ ]         STREAM     CONNECTED     24588530 446443/WebKitNetwor
unix  3      [ ]         STREAM     CONNECTED     24433290 1/systemd            /run/systemd/journal/stdout
unix  3      [ ]         STREAM     CONNECTED     24588523 446443/WebKitNetwor
unix  3      [ ]         STREAM     CONNECTED     24433288 438233/fwupd
unix  3      [ ]         SEQPACKET  CONNECTED     24588536 446443/WebKitNetwor
unix  3      [ ]         STREAM     CONNECTED     24433306 438233/fwupd
unix  3      [ ]         STREAM     CONNECTED     24432328 616/dbus-daemon      /run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     24628094 448102/containerd-s  @/containerd-shim/moby/adaa8c3f4f239d443191aa03c37d4f9b2dc5867f355327bf9ac454c04228c421/shim.sock@
root $

```

My understanding of this problem is that it relates more to running the container rather than building the image. Yet the image wasn't built? I don't see it listed in `docker images`, and certainly nothing recent.

This is almost certainly a conflict with an existing container?

# Answer
thought it was working because `docker-compose build` returned without errors.

I've tried a few URL's, but can't quite tell what happened:

```
root $
root $ docker-compose up
Starting frappe_docker_erpnext-nginx_1 ...
frappe_docker_mariadb_1 is up-to-date
frappe_docker_redis-cache_1 is up-to-date
Starting frappe_docker_traefik_1       ...
frappe_docker_erpnext-python_1 is up-to-date
frappe_docker_redis-socketio_1 is up-to-date
frappe_docker_redis-queue_1 is up-to-date
Starting frappe_docker_site-creator_1  ...
frappe_docker_frappe-socketio_1 is up-to-date
frappe_docker_erpnext-schedule_1 is up-to-date
Starting frappe_docker_erpnext-nginx_1 ... done
Starting frappe_docker_traefik_1       ... done
Starting frappe_docker_site-creator_1  ... done
Attaching to frappe_docker_mariadb_1, frappe_docker_redis-cache_1, frappe_docker_erpnext-python_1, frappe_docker_redis-socketio_1, frappe_docker_redis-queue_1, frappe_docker_frappe-socketio_1, frappe_docker_erpnext-schedule_1, frappe_docker_erpnext-worker-default_1, frappe_docker_erpnext-worker-short_1, frappe_docker_erpnext-worker-long_1, frappe_docker_site-creator_1, frappe_docker_erpnext-nginx_1, frappe_docker_traefik_1
erpnext-python_1          | Attempt 1 to connect to mariadb:3306
erpnext-python_1          | Attempt 2 to connect to mariadb:3306
erpnext-python_1          | Attempt 3 to connect to mariadb:3306
erpnext-python_1          | Attempt 4 to connect to mariadb:3306
erpnext-python_1          | Attempt 5 to connect to mariadb:3306
erpnext-python_1          | Attempt 1 to connect to redis-queue:6379
erpnext-python_1          | Attempt 1 to connect to redis-cache:6379
erpnext-python_1          | Attempt 1 to connect to redis-socketio:6379
erpnext-python_1          | Connections OK
erpnext-python_1          | [2020-09-24 21:42:51 +0000] [20] [INFO] Starting gunicorn 19.10.0
erpnext-python_1          | [2020-09-24 21:42:51 +0000] [20] [INFO] Listening at: http://0.0.0.0:8000 (20)
erpnext-python_1          | [2020-09-24 21:42:51 +0000] [20] [INFO] Using worker: gthread
erpnext-python_1          | [2020-09-24 21:42:51 +0000] [23] [INFO] Booting worker with pid: 23
erpnext-python_1          | [2020-09-24 21:42:51 +0000] [24] [INFO] Booting worker with pid: 24
erpnext-schedule_1        | Attempt 1 to connect to mariadb:3306
erpnext-schedule_1        | Attempt 1 to connect to redis-queue:6379
erpnext-schedule_1        | Attempt 1 to connect to redis-cache:6379
erpnext-schedule_1        | Attempt 1 to connect to redis-socketio:6379
erpnext-schedule_1        | Connections OK
erpnext-schedule_1        | Starting background scheduler . . .
erpnext-worker-long_1     | Attempt 1 to connect to mariadb:3306
erpnext-worker-long_1     | Attempt 1 to connect to redis-queue:6379
erpnext-worker-long_1     | Attempt 1 to connect to redis-cache:6379
erpnext-worker-long_1     | Attempt 1 to connect to redis-socketio:6379
erpnext-worker-long_1     | Connections OK
erpnext-worker-long_1     | 21:42:50 Worker rq:worker:9e230e83f0a54f2c9e23cf8c05803a5b.d7c672c3b8e4.13.long: started, version 1.5.2
erpnext-worker-long_1     | 21:42:50 *** Listening on long...
erpnext-worker-long_1     | 21:42:50 Cleaning registries for queue: long
erpnext-worker-short_1    | Attempt 1 to connect to mariadb:3306
erpnext-worker-short_1    | Attempt 1 to connect to redis-queue:6379
erpnext-worker-short_1    | Attempt 1 to connect to redis-cache:6379
erpnext-worker-short_1    | Attempt 1 to connect to redis-socketio:6379
erpnext-worker-short_1    | Connections OK
erpnext-worker-short_1    | 21:42:50 Worker rq:worker:2b7b866af6af496fa729c4ad20e78978.7da607a8d5a8.13.short: started, version 1.5.2
erpnext-worker-short_1    | 21:42:50 *** Listening on short...
erpnext-worker-short_1    | 21:42:50 Cleaning registries for queue: short
redis-queue_1             | 1:C 24 Sep 2020 21:42:20.656 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-queue_1             | 1:C 24 Sep 2020 21:42:20.656 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=1, just started
redis-queue_1             | 1:C 24 Sep 2020 21:42:20.656 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.657 * Increased maximum number of open files to 10032 (it was originally set to 1024).
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 * Running mode=standalone, port=6379.
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 # Server initialized
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 * Loading RDB produced by version 6.0.8
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 * RDB age 37 seconds
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 * RDB memory usage when created 0.83 Mb
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 * DB loaded from disk: 0.000 seconds
redis-queue_1             | 1:M 24 Sep 2020 21:42:20.658 * Ready to accept connections
mariadb_1                 | 2020-09-24 21:42:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.24+maria~focal started.
mariadb_1                 | 2020-09-24 21:42:15+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mariadb_1                 | 2020-09-24 21:42:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.24+maria~focal started.
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] mysqld (mysqld 10.3.24-MariaDB-1:10.3.24+maria~focal) starting as process 1 ...
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Using Linux native AIO
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Uses event mutexes
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Number of pools: 1
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Using generic crc32 instructions
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb_1                 | 2020-09-24 21:42:16 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] InnoDB: 10.3.24 started; log sequence number 39389994; transaction id 12198
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb_1                 | 2020-09-24 21:42:31 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb_1                 | 2020-09-24 21:42:32 0 [Note] Server socket created on IP: '::'.
mariadb_1                 | 2020-09-24 21:42:32 0 [Warning] 'proxies_priv' entry '@% root@ae9b03a0d7ee' ignored in --skip-name-resolve mode.
mariadb_1                 | 2020-09-24 21:42:32 0 [Note] Reading of all Master_info entries succeeded
mariadb_1                 | 2020-09-24 21:42:32 0 [Note] Added new Master_info '' to hash table
mariadb_1                 | 2020-09-24 21:42:32 0 [Note] mysqld: ready for connections.
mariadb_1                 | Version: '10.3.24-MariaDB-1:10.3.24+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
mariadb_1                 | 2020-09-24 21:43:04 0 [Note] InnoDB: Buffer pool(s) load completed at 200924 21:43:04
erpnext-worker-default_1  | Attempt 1 to connect to mariadb:3306
erpnext-worker-default_1  | Attempt 1 to connect to redis-queue:6379
erpnext-worker-default_1  | Attempt 1 to connect to redis-cache:6379
erpnext-worker-default_1  | Attempt 1 to connect to redis-socketio:6379
erpnext-worker-default_1  | Connections OK
erpnext-worker-default_1  | 21:42:50 Worker rq:worker:1c434d0c9d5d4d61874e73a1eab8cad6.f18a505e3d01.14.default: started, version 1.5.2
erpnext-worker-default_1  | 21:42:50 *** Listening on default...
erpnext-worker-default_1  | 21:42:50 Cleaning registries for queue: default
redis-cache_1             | 1:C 24 Sep 2020 21:42:19.998 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-cache_1             | 1:C 24 Sep 2020 21:42:19.998 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=1, just started
redis-cache_1             | 1:C 24 Sep 2020 21:42:19.998 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.000 * Increased maximum number of open files to 10032 (it was originally set to 1024).
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.266 * Running mode=standalone, port=6379.
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.266 # Server initialized
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.266 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.267 * Loading RDB produced by version 6.0.8
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.267 * RDB age 37 seconds
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.267 * RDB memory usage when created 1.33 Mb
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.269 * DB loaded from disk: 0.003 seconds
redis-cache_1             | 1:M 24 Sep 2020 21:42:20.269 * Ready to accept connections
frappe-socketio_1         | listening on *: 9000
redis-socketio_1          | 1:C 24 Sep 2020 21:42:24.894 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-socketio_1          | 1:C 24 Sep 2020 21:42:24.894 # Redis version=6.0.8, bits=64, commit=00000000, modified=0, pid=1, just started
redis-socketio_1          | 1:C 24 Sep 2020 21:42:24.894 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.895 * Increased maximum number of open files to 10032 (it was originally set to 1024).
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 * Running mode=standalone, port=6379.
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 # Server initialized
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 * Loading RDB produced by version 6.0.8
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 * RDB age 41 seconds
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 * RDB memory usage when created 0.79 Mb
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 * DB loaded from disk: 0.000 seconds
redis-socketio_1          | 1:M 24 Sep 2020 21:42:24.896 * Ready to accept connections
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Configuration loaded from flags."
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Traefik version 2.2.11 built on 2020-09-07T14:12:48Z"
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Static configuration loaded {\"global\":{\"checkNewVersion\":true},\"serversTransport\":{\"maxIdleConnsPerHost\":200},\"entryPoints\":{\"web\":{\"address\":\":80\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":10000000000},\"respondingTimeouts\":{\"idleTimeout\":180000000000}},\"forwardedHeaders\":{},\"http\":{}},\"websecure\":{\"address\":\":443\",\"transport\":{\"lifeCycle\":{\"graceTimeOut\":10000000000},\"respondingTimeouts\":{\"idleTimeout\":180000000000}},\"forwardedHeaders\":{},\"http\":{}}},\"providers\":{\"providersThrottleDuration\":2000000000,\"docker\":{\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":15000000000}},\"log\":{\"level\":\"DEBUG\",\"format\":\"common\"},\"certificatesResolvers\":{\"myresolver\":{\"acme\":{\"email\":\"saunders.nicholas@gmail.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"httpChallenge\":{\"entryPoint\":\"web\"}}}}}"
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://docs.traefik.io/contributing/data-collection/\n"
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Starting provider aggregator.ProviderAggregator {}"
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Start TCP Server" entryPointName=web
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Start TCP Server" entryPointName=websecure
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Starting provider *acme.Provider {\"email\":\"saunders.nicholas@gmail.com\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"/letsencrypt/acme.json\",\"keyType\":\"RSA4096\",\"httpChallenge\":{\"entryPoint\":\"web\"},\"ResolverName\":\"myresolver\",\"store\":{},\"ChallengeStore\":{}}"
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Testing certificate renew..." providerName=myresolver.acme
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Starting provider *docker.Provider {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`{{ normalize .Name }}`)\",\"swarmModeRefreshSeconds\":15000000000}"
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Configuration received from provider myresolver.acme: {\"http\":{},\"tls\":{}}" providerName=myresolver.acme
traefik_1                 | time="2020-09-24T21:46:16Z" level=info msg="Starting provider *traefik.Provider {}"
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="No default certificate, generating one"
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Configuration received from provider internal: {\"http\":{\"services\":{\"noop\":{}}},\"tcp\":{},\"tls\":{}}" providerName=internal
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Provider connection established with docker 19.03.11 (API 1.40)" providerName=docker
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=frappe-socketio-frappe-docker-547893b784969e960c010590b90d256a5844d4eda6bef53402117f25fd6cd835
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=erpnext-worker-long-frappe-docker-d7c672c3b8e46b1ddbdea4540aaae117852a22cdc04cbddb6a4c9aa5f678849b
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=erpnext-schedule-frappe-docker-16916a30304b6f542c219ed353f1c924fcd6d9142f4ab17e101eab8adc3b2f4f
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=erpnext-worker-default-frappe-docker-f18a505e3d01d1fc0741cfdc15ff33d0188e9e4de5852e3c760eb22a066749b9
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=erpnext-worker-short-frappe-docker-7da607a8d5a81077d1dd500f9ed6888f84cfbcbd7dd2efab11565611a66f2e2a
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=site-creator-frappe-docker-6ea0246bf12dbaf11c684dbecc9dd449b30f38930610b3a6bdd6fcc31a416b92
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=mariadb-frappe-docker-70879517dbbf4ed9c84627f8b312709a56832e423df82715ad0db82c1ed5321b
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=redis-socketio-frappe-docker-e1b06e870f32304b7dcc863a2fef341d0642a929cd721a9220af1c9f845cdf9c
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=erpnext-python-frappe-docker-b8ef2a1cd6858a6a7aa2517928dddffc2dfde713090a6d160847a641288521c6
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=redis-cache-frappe-docker-d7cbac8c826b3c00cb5a699d89d8dd261b6efecdcf75e0e5117459b3a2b1ac57
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Filtering disabled container" providerName=docker container=redis-queue-frappe-docker-4d6c6ed96e2a4da4d7efa21299e6ea9fb74f09bdc466fd878598f5cd288090ad
traefik_1                 | time="2020-09-24T21:46:16Z" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"erpnext-nginx\":{\"entryPoints\":[\"websecure\"],\"service\":\"erpnext-nginx\",\"rule\":\"Host(`erp.saundersconsulting.tech)\",\"tls\":{\"certResolver\":\"myresolver\"}},\"http-catchall\":{\"entryPoints\":[\"web\"],\"middlewares\":[\"redirect-to-https\"],\"service\":\"traefik-frappe-docker\",\"rule\":\"hostregexp(`{host:.+}`)\"}},\"services\":{\"erpnext-nginx\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.20.0.4:80\"}],\"passHostHeader\":true}},\"traefik-frappe-docker\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.20.0.14:80\"}],\"passHostHeader\":true}}},\"middlewares\":{\"redirect-to-https\":{\"redirectScheme\":{\"scheme\":\"https\"}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="No default certificate, generating one"
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating middleware" middlewareName=pipelining middlewareType=Pipelining entryPointName=web routerName=http-catchall@docker serviceName=traefik-frappe-docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating load-balancer" entryPointName=web routerName=http-catchall@docker serviceName=traefik-frappe-docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating server 0 http://172.20.0.14:80" entryPointName=web routerName=http-catchall@docker serverName=0 serviceName=traefik-frappe-docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Added outgoing tracing middleware traefik-frappe-docker" middlewareName=tracing middlewareType=TracingForwarder entryPointName=web routerName=http-catchall@docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating middleware" middlewareType=RedirectScheme entryPointName=web routerName=http-catchall@docker middlewareName=redirect-to-https@docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Setting up redirection to https " middlewareType=RedirectScheme entryPointName=web routerName=http-catchall@docker middlewareName=redirect-to-https@docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Adding tracing to middleware" entryPointName=web routerName=http-catchall@docker middlewareName=redirect-to-https@docker
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating middleware" entryPointName=web middlewareType=Recovery middlewareName=traefik-internal-recovery
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating middleware" routerName=erpnext-nginx@docker serviceName=erpnext-nginx middlewareName=pipelining middlewareType=Pipelining entryPointName=websecure
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating load-balancer" entryPointName=websecure routerName=erpnext-nginx@docker serviceName=erpnext-nginx
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating server 0 http://172.20.0.4:80" entryPointName=websecure routerName=erpnext-nginx@docker serviceName=erpnext-nginx serverName=0
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Added outgoing tracing middleware erpnext-nginx" middlewareName=tracing middlewareType=TracingForwarder routerName=erpnext-nginx@docker entryPointName=websecure
traefik_1                 | time="2020-09-24T21:46:17Z" level=error msg="error while parsing rule Host(`erp.saundersconsulting.tech): 1:6: raw string literal not terminated" routerName=erpnext-nginx@docker entryPointName=websecure
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="Creating middleware" entryPointName=websecure middlewareName=traefik-internal-recovery middlewareType=Recovery
traefik_1                 | time="2020-09-24T21:46:17Z" level=debug msg="No default certificate, generating one"
traefik_1                 | time="2020-09-24T21:46:18Z" level=error msg="Error parsing domains in provider ACME: 1:6: raw string literal not terminated" providerName=myresolver.acme routerName=erpnext-nginx@docker rule="Host(`erp.saundersconsulting.tech)"
site-creator_1            | Attempt 1 to connect to mariadb:3306
site-creator_1            | Attempt 1 to connect to redis-queue:6379
site-creator_1            | Attempt 1 to connect to redis-cache:6379
site-creator_1            | Attempt 1 to connect to redis-socketio:6379
site-creator_1            | Connections OK
site-creator_1            | Site erp.saundersconsulting.tech already exists
traefik_1                 | time="2020-09-24T21:46:26Z" level=debug msg="Provider event received {Status:die ID:6ea0246bf12dbaf11c684dbecc9dd449b30f38930610b3a6bdd6fcc31a416b92 From:frappe/erpnext-worker:edge Type:container Action:die Actor:{ID:6ea0246bf12dbaf11c684dbecc9dd449b30f38930610b3a6bdd6fcc31a416b92 Attributes:map[com.docker.compose.config-

```

...

```
traefik_1                 | time="2020-09-24T21:46:30Z" level=debug msg="Filtering disabled container" container=redis-queue-frappe-docker-4d6c6ed96e2a4da4d7efa21299e6ea9fb74f09bdc466fd878598f5cd288090ad providerName=docker
traefik_1                 | time="2020-09-24T21:46:30Z" level=debug msg="Configuration received from provider docker: {\"http\":{\"routers\":{\"erpnext-nginx\":{\"entryPoints\":[\"websecure\"],\"service\":\"erpnext-nginx\",\"rule\":\"Host(`erp.saundersconsulting.tech)\",\"tls\":{\"certResolver\":\"myresolver\"}},\"http-catchall\":{\"entryPoints\":[\"web\"],\"middlewares\":[\"redirect-to-https\"],\"service\":\"traefik-frappe-docker\",\"rule\":\"hostregexp(`{host:.+}`)\"}},\"services\":{\"erpnext-nginx\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.20.0.4:80\"}],\"passHostHeader\":true}},\"traefik-frappe-docker\":{\"loadBalancer\":{\"servers\":[{\"url\":\"http://172.20.0.14:80\"}],\"passHostHeader\":true}}},\"middlewares\":{\"redirect-to-https\":{\"redirectScheme\":{\"scheme\":\"https\"}}}},\"tcp\":{},\"udp\":{}}" providerName=docker
traefik_1                 | time="2020-09-24T21:46:30Z" level=info msg="Skipping same configuration" providerName=docker
erpnext-nginx_1           | Waiting for frappe-python to be available on erpnext-python port 8000
erpnext-nginx_1           | Frappe-python available on erpnext-python port 8000
erpnext-nginx_1           | Waiting for frappe-socketio to be available on frappe-socketio port 9000
erpnext-nginx_1           | Frappe-socketio available on frappe-socketio port 9000
redis-cache_1             | 1:M 24 Sep 2020 21:47:21.055 * 100 changes in 300 seconds. Saving...
redis-cache_1             | 1:M 24 Sep 2020 21:47:21.056 * Background saving started by pid 18
redis-cache_1             | 18:C 24 Sep 2020 21:47:21.107 * DB saved on disk
redis-cache_1             | 18:C 24 Sep 2020 21:47:21.108 * RDB: 0 MB of memory used by copy-on-write
redis-cache_1             | 1:M 24 Sep 2020 21:47:21.156 * Background saving terminated with success
traefik_1                 | time="2020-09-24T21:50:09Z" level=debug msg="Serving default certificate for request: \"localhost\""
traefik_1                 | time="2020-09-24T21:50:09Z" level=debug msg="http: TLS handshake error from 172.20.0.1:40102: remote error: tls: bad certificate"
traefik_1                 | time="2020-09-24T21:50:14Z" level=debug msg="Serving default certificate for request: \"localhost\""

```

Looking at the below `entrypoint`:

```
root $
root $ docker container ls
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                                      NAMES
547893b78496        frappe/frappe-socketio:edge   "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes                                                  frappe_docker_frappe-socketio_1
d7c672c3b8e4        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       8000/tcp                                   frappe_docker_erpnext-worker-long_1
16916a30304b        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       8000/tcp                                   frappe_docker_erpnext-schedule_1
f18a505e3d01        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       8000/tcp                                   frappe_docker_erpnext-worker-default_1
7da607a8d5a8        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       8000/tcp                                   frappe_docker_erpnext-worker-short_1
70879517dbbf        mariadb:10.3                  "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       3306/tcp                                   frappe_docker_mariadb_1
e1b06e870f32        redis:latest                  "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       6379/tcp                                   frappe_docker_redis-socketio_1
b8ef2a1cd685        frappe/erpnext-worker:edge    "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       8000/tcp                                   frappe_docker_erpnext-python_1
d6555ff0f12f        traefik:v2.2                  "/entrypoint.sh --lo…"   11 minutes ago      Up 7 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   frappe_docker_traefik_1
d7cbac8c826b        redis:latest                  "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       6379/tcp                                   frappe_docker_redis-cache_1
55b3a31ee25c        frappe/erpnext-nginx:edge     "/docker-entrypoint.…"   11 minutes ago      Up 7 minutes        80/tcp                                     frappe_docker_erpnext-nginx_1
4d6c6ed96e2a        redis:latest                  "docker-entrypoint.s…"   11 minutes ago      Up 11 minutes       6379/tcp                                   frappe_docker_redis-queue_1
root $

```

I tried a few of those ports, best result was a `404` from `localhost` on Firefox which I *think* was from this unconfigured app.

Quite possibly everything's working as intended, but simply needs configuration.
> 1 votes

---
Tags: docker, docker-compose, containers, networking, images
---